Mercurial > libavcodec.hg
comparison h264_parser.c @ 9056:4180f20569c1 libavcodec
Initialize H264 parser context correctly if the optional SEI messages
are not present.
Patch by Ivan Schreter, schreter gmx net
author | cehoyos |
---|---|
date | Thu, 26 Feb 2009 20:36:02 +0000 |
parents | d4002371b3d2 |
children | 0adefec7e2b4 |
comparison
equal
deleted
inserted
replaced
9055:15515243f476 | 9056:4180f20569c1 |
---|---|
258 ff_h264_find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state | 258 ff_h264_find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state |
259 } | 259 } |
260 | 260 |
261 parse_nal_units(s, avctx, buf, buf_size); | 261 parse_nal_units(s, avctx, buf, buf_size); |
262 | 262 |
263 if (h->sei_cpb_removal_delay >= 0) { | |
263 s->dts_sync_point = h->sei_buffering_period_present; | 264 s->dts_sync_point = h->sei_buffering_period_present; |
264 s->dts_ref_dts_delta = h->sei_cpb_removal_delay; | 265 s->dts_ref_dts_delta = h->sei_cpb_removal_delay; |
265 s->pts_dts_delta = h->sei_dpb_output_delay; | 266 s->pts_dts_delta = h->sei_dpb_output_delay; |
267 } else { | |
268 s->dts_sync_point = INT_MIN; | |
269 s->dts_ref_dts_delta = INT_MIN; | |
270 s->pts_dts_delta = INT_MIN; | |
271 } | |
266 } | 272 } |
267 | 273 |
268 *poutbuf = buf; | 274 *poutbuf = buf; |
269 *poutbuf_size = buf_size; | 275 *poutbuf_size = buf_size; |
270 return next; | 276 return next; |