mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-16 05:41:08 +08:00
implement new grabbing interface, as described here:
ttp://thread.gmane.org/gmane.comp.video.ffmpeg.devel/42920 patch by Ramiro Polla % ramiro A lisha P ufsc P br % Original thread: Date: Jan 31, 2007 8:56 PM Subject: [Ffmpeg-devel] [PATCH] New grabbing interface Originally committed as revision 7983 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:

committed by
Guillaume Poirier

parent
2012121363
commit
cc58300e30
@@ -53,14 +53,6 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device)
|
||||
int tmp, err;
|
||||
char *flip = getenv("AUDIO_FLIP_LEFT");
|
||||
|
||||
/* open linux audio device */
|
||||
if (!audio_device)
|
||||
#ifdef __OpenBSD__
|
||||
audio_device = "/dev/sound";
|
||||
#else
|
||||
audio_device = "/dev/dsp";
|
||||
#endif
|
||||
|
||||
if (is_output)
|
||||
audio_fd = open(audio_device, O_WRONLY);
|
||||
else
|
||||
@@ -229,7 +221,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
||||
s->sample_rate = ap->sample_rate;
|
||||
s->channels = ap->channels;
|
||||
|
||||
ret = audio_open(s, 0, ap->device);
|
||||
ret = audio_open(s, 0, s1->filename);
|
||||
if (ret < 0) {
|
||||
av_free(st);
|
||||
return AVERROR_IO;
|
||||
|
Reference in New Issue
Block a user