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...
This commit is contained in:
Edward Hervey 2006-02-13 16:01:50 +00:00
parent c72d7e8b49
commit fa4b52bdca
3 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2006-02-13 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_release_buffer),
(gst_ffmpegdec_frame):
More fixes for keyframe detection in ffmpeg decoders...
2006-02-12 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_to_pixfmt):

2
common

@ -1 +1 @@
Subproject commit 58567e5519f2d00a4592491db1a6e8302993279e
Subproject commit c30611ac38336030fed6d258c6e558cc537adbc5

View file

@ -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",