[Ffmpeg-devel] h264 stream decoding problem
Francois Oligny-Lemieux
eucloid
Sat Feb 24 02:23:09 CET 2007
Hello,
On 2/23/07, Klaas-Pieter Vlieg <vlieg at eurescom.eu> wrote:
>
>
> Actually I've substituted avcodec_decode_video() by a call to
> a dsp function, since I'm using ffmpeg on an embedded platform.
> That dsp must have a keyframe as the very first frame. Are there
> ffmpeg functions where I can test for keyframes before calling
> avcodec_decode_video() ?
Well if it can help, I use a parser where I wait for an I frame. The logic I
use (and correct me if I miss cases) and which works fine with at least two
devices is:
if nal_type == NAL_SLICE_IDR // ==5
then it's a key frame
if nal_type == NAL_SLICE // ==1
and if ( slice_type == 7 or 2 )
then it's a key frame
It is very minimalist and I suspect it might not work for all sort of
bitstream.
Good luck,
Francois O.L.
More information about the ffmpeg-devel
mailing list