[FFmpeg-devel] [PATCH] missing last frame for h264 decoding + CODEC_FLAG_TRUNCATED

Pascal Massimino pascal.massimino
Fri May 23 22:36:13 CEST 2008


  Hi everybody,

  attached a patch for h264 decoding in CODEC_FLAG_TRUNCATED mode:
  even during the last call to decode_frame() with buf_size = 0, i'd say
  we need to flush the buffers in the ParseContext before calling it
quit for good.

  Also: when flushing (for seek), we need to wipe the ParseContext too, to
  get rid of pending frame fragments.

  I've uploaded a very small 'test_2frames.264' raw h264 file into incoming/
  on the ftp.
  Without this patch, repeated call to decode_frame() wouldn't decode the
  last frame.

skal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trunc.patch
Type: text/x-diff
Size: 1478 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080523/cdc27ef5/attachment.patch>



More information about the ffmpeg-devel mailing list