Mercurial > libavcodec.hg
comparison h264_parser.c @ 9039:d4002371b3d2 libavcodec
Export timestamp parameter from H.264.
Patch by Ivan Schreter, schreter gmx net
author | cehoyos |
---|---|
date | Tue, 24 Feb 2009 22:24:34 +0000 |
parents | d22ed7aad1b0 |
children | 4180f20569c1 |
comparison
equal
deleted
inserted
replaced
9038:d4c12f2d226b | 9039:d4002371b3d2 |
---|---|
121 s->pict_type = FF_I_TYPE; | 121 s->pict_type = FF_I_TYPE; |
122 s->key_frame = 0; | 122 s->key_frame = 0; |
123 | 123 |
124 h->s.avctx= avctx; | 124 h->s.avctx= avctx; |
125 h->sei_recovery_frame_cnt = -1; | 125 h->sei_recovery_frame_cnt = -1; |
126 h->sei_dpb_output_delay = 0; | |
127 h->sei_cpb_removal_delay = -1; | |
128 h->sei_buffering_period_present = 0; | |
126 | 129 |
127 for(;;) { | 130 for(;;) { |
128 int src_length, dst_length, consumed; | 131 int src_length, dst_length, consumed; |
129 buf = ff_find_start_code(buf, buf_end, &state); | 132 buf = ff_find_start_code(buf, buf_end, &state); |
130 if(buf >= buf_end) | 133 if(buf >= buf_end) |
254 assert(pc->last_index + next >= 0 ); | 257 assert(pc->last_index + next >= 0 ); |
255 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 |
256 } | 259 } |
257 | 260 |
258 parse_nal_units(s, avctx, buf, buf_size); | 261 parse_nal_units(s, avctx, buf, buf_size); |
262 | |
263 s->dts_sync_point = h->sei_buffering_period_present; | |
264 s->dts_ref_dts_delta = h->sei_cpb_removal_delay; | |
265 s->pts_dts_delta = h->sei_dpb_output_delay; | |
259 } | 266 } |
260 | 267 |
261 *poutbuf = buf; | 268 *poutbuf = buf; |
262 *poutbuf_size = buf_size; | 269 *poutbuf_size = buf_size; |
263 return next; | 270 return next; |