summaryrefslogtreecommitdiff
path: root/codec.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2011-12-23 23:01:30 +0100
committerJohns <johns98@gmx.net>2011-12-23 23:01:30 +0100
commitf18b0bda1c3840f79fcaab72b153d742e31caa90 (patch)
treee96050b47479759768a9bc92340e4aca847f814d /codec.c
parenta8259bec6510396f032490b79e609c0c4939957e (diff)
downloadvdr-plugin-softhddevice-f18b0bda1c3840f79fcaab72b153d742e31caa90.tar.gz
vdr-plugin-softhddevice-f18b0bda1c3840f79fcaab72b153d742e31caa90.tar.bz2
Libav needs buggy ffmpeg workaround.
Fix buggy ffmpeg/libav workaround, reset flag.
Diffstat (limited to 'codec.c')
-rw-r--r--codec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/codec.c b/codec.c
index 6605a40..a5e3bbd 100644
--- a/codec.c
+++ b/codec.c
@@ -93,7 +93,7 @@ static enum PixelFormat Codec_get_format(AVCodecContext * video_ctx,
VideoDecoder *decoder;
decoder = video_ctx->opaque;
- Debug(3, "codec: %s: %18p\n", __FUNCTION__, decoder);
+ //Debug(3, "codec: %s: %18p\n", __FUNCTION__, decoder);
decoder->GetFormatDone = 1;
return Video_get_format(decoder->HwDecoder, video_ctx, fmt);
}
@@ -114,8 +114,8 @@ static int Codec_get_buffer(AVCodecContext * video_ctx, AVFrame * frame)
if (!decoder->GetFormatDone) { // get_format missing
enum PixelFormat fmts[2];
- fprintf(stderr, "codec: buggy ffmpeg\n");
- Warning(_("codec: buggy ffmpeg\n"));
+ fprintf(stderr, "codec: buggy ffmpeg/libav\n");
+ Warning(_("codec: buggy ffmpeg/libav\n"));
fmts[0] = video_ctx->pix_fmt;
fmts[1] = PIX_FMT_NONE;
Codec_get_format(video_ctx, fmts);
@@ -417,6 +417,9 @@ void CodecVideoOpen(VideoDecoder * decoder, const char *name, int codec_id)
if (!(decoder->Frame = avcodec_alloc_frame())) {
Fatal(_("codec: can't allocate decoder frame\n"));
}
+
+ // reset buggy ffmpeg/libav flag
+ decoder->GetFormatDone = 0;
}
/**