diff options
author | Ivan Schreter <schreter@gmx.net> | 2009-02-26 20:36:02 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2009-02-26 20:36:02 +0000 |
commit | 2c0c5e1249cccfa376418d3c47a2aea48717e17a (patch) | |
tree | d8c482ea3c9646311f2a9750812e5f68258170fc | |
parent | 17af052531a078396f5db08d0bd000051911c595 (diff) | |
download | ffmpeg-2c0c5e1249cccfa376418d3c47a2aea48717e17a.tar.gz |
Initialize H264 parser context correctly if the optional SEI messages
are not present.
Patch by Ivan Schreter, schreter gmx net
Originally committed as revision 17620 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264_parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 934ca15cfe..8c726976dd 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -260,9 +260,15 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); + if (h->sei_cpb_removal_delay >= 0) { s->dts_sync_point = h->sei_buffering_period_present; s->dts_ref_dts_delta = h->sei_cpb_removal_delay; s->pts_dts_delta = h->sei_dpb_output_delay; + } else { + s->dts_sync_point = INT_MIN; + s->dts_ref_dts_delta = INT_MIN; + s->pts_dts_delta = INT_MIN; + } } *poutbuf = buf; |