ffmpeg: fix mixup of old and new sinks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/59/head
Michael Niedermayer 13 years ago
parent f8fe4d2295
commit caf7381d50
  1. 8
      ffmpeg.c

@ -104,8 +104,6 @@
#define VSYNC_VFR 2 #define VSYNC_VFR 2
#define VSYNC_DROP 0xff #define VSYNC_DROP 0xff
#define SINKA
const char program_name[] = "ffmpeg"; const char program_name[] = "ffmpeg";
const int program_birth_year = 2000; const int program_birth_year = 2000;
@ -1925,13 +1923,11 @@ static int poll_filters(void)
!(ost->enc->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)) !(ost->enc->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE))
ret = av_buffersink_read_samples(ost->filter->filter, &picref, ret = av_buffersink_read_samples(ost->filter->filter, &picref,
ost->st->codec->frame_size); ost->st->codec->frame_size);
else else if(ost->enc->type == AVMEDIA_TYPE_AUDIO)
#ifdef SINKA
ret = av_buffersink_read(ost->filter->filter, &picref); ret = av_buffersink_read(ost->filter->filter, &picref);
#else else
ret = av_buffersink_get_buffer_ref(ost->filter->filter, &picref, ret = av_buffersink_get_buffer_ref(ost->filter->filter, &picref,
AV_BUFFERSINK_FLAG_NO_REQUEST); AV_BUFFERSINK_FLAG_NO_REQUEST);
#endif
if (ret < 0) { if (ret < 0) {
if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) { if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) {
char buf[256]; char buf[256];

Loading…
Cancel
Save