summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2006-02-13 16:01:50 +0000
committerEdward Hervey <bilboed@bilboed.com>2006-02-13 16:01:50 +0000
commitfa4b52bdca5eba11493b84a95f20c7d53aa4eddc (patch)
tree89c1ab1a0158c39529b6f1c59279236088ae4508 /ext
parentc72d7e8b499dfb7712d6cb1463837fed5119af31 (diff)
ext/ffmpeg/gstffmpegdec.c: More fixes for keyframe detection in ffmpeg decoders...
Original commit message from CVS: * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_release_buffer), (gst_ffmpegdec_frame): More fixes for keyframe detection in ffmpeg decoders...
Diffstat (limited to 'ext')
-rw-r--r--ext/ffmpeg/gstffmpegdec.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 6701827..01c0552 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -623,11 +623,12 @@ gst_ffmpegdec_release_buffer (AVCodecContext * context, AVFrame * picture)
GstBuffer *buf;
GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) context->opaque;
- g_return_if_fail (buf != NULL);
g_return_if_fail (picture->type == FF_BUFFER_TYPE_USER);
buf = GST_BUFFER (picture->opaque);
+ g_return_if_fail (buf != NULL);
+
if (buf == ffmpegdec->last_buffer)
ffmpegdec->last_buffer = NULL;
gst_buffer_unref (buf);
@@ -821,11 +822,12 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
ffmpegdec->picture, &have_data, data, size);
is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
is_reference = (ffmpegdec->picture->reference == 1);
- iskeyframe = (is_itype || is_reference)
+ iskeyframe = (is_itype || is_reference || ffmpegdec->picture->key_frame)
|| (oclass->in_plugin->id == CODEC_ID_INDEO3)
|| (oclass->in_plugin->id == CODEC_ID_MSZH)
|| (oclass->in_plugin->id == CODEC_ID_ZLIB)
- || (oclass->in_plugin->id == CODEC_ID_VP3);
+ || (oclass->in_plugin->id == CODEC_ID_VP3)
+ || (oclass->in_plugin->id == CODEC_ID_HUFFYUV);
GST_LOG_OBJECT (ffmpegdec,
"Decoded video: len=%d, have_data=%d, "
"is_keyframe:%d, is_itype:%d, is_reference:%d",