diff options
author | Johns <johns98@gmx.net> | 2011-12-23 23:01:30 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2011-12-23 23:01:30 +0100 |
commit | f18b0bda1c3840f79fcaab72b153d742e31caa90 (patch) | |
tree | e96050b47479759768a9bc92340e4aca847f814d | |
parent | a8259bec6510396f032490b79e609c0c4939957e (diff) | |
download | vdr-plugin-softhddevice-f18b0bda1c3840f79fcaab72b153d742e31caa90.tar.gz vdr-plugin-softhddevice-f18b0bda1c3840f79fcaab72b153d742e31caa90.tar.bz2 |
Libav needs buggy ffmpeg workaround.
Fix buggy ffmpeg/libav workaround, reset flag.
-rw-r--r-- | codec.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; } /** |