comparison h264_parser.c @ 9000:78afc2990d00 libavcodec

Use context variable repeat_pict for frame duration computation and document this new use. Patch by Ivan Schreter, schreter gmx net
author cehoyos
date Sat, 21 Feb 2009 20:11:47 +0000
parents f701dab6a62d
children d22ed7aad1b0
comparison
equal deleted inserted replaced
8999:f701dab6a62d 9000:78afc2990d00
190 } else { 190 } else {
191 h->s.picture_structure= PICT_FRAME; 191 h->s.picture_structure= PICT_FRAME;
192 } 192 }
193 } 193 }
194 194
195 if(h->sps.pic_struct_present_flag) {
196 switch (h->sei_pic_struct) {
197 case SEI_PIC_STRUCT_TOP_FIELD:
198 case SEI_PIC_STRUCT_BOTTOM_FIELD:
199 s->repeat_pict = -1;
200 break;
201 case SEI_PIC_STRUCT_FRAME:
202 case SEI_PIC_STRUCT_TOP_BOTTOM:
203 case SEI_PIC_STRUCT_BOTTOM_TOP:
204 s->repeat_pict = 0;
205 break;
206 case SEI_PIC_STRUCT_TOP_BOTTOM_TOP:
207 case SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM:
208 s->repeat_pict = 1;
209 break;
210 case SEI_PIC_STRUCT_FRAME_DOUBLING:
211 s->repeat_pict = 2;
212 break;
213 case SEI_PIC_STRUCT_FRAME_TRIPLING:
214 s->repeat_pict = 4;
215 break;
216 default:
217 s->repeat_pict = h->s.picture_structure == PICT_FRAME ? 0 : -1;
218 break;
219 }
220 } else {
221 s->repeat_pict = h->s.picture_structure == PICT_FRAME ? 0 : -1;
222 }
223
195 return 0; /* no need to evaluate the rest */ 224 return 0; /* no need to evaluate the rest */
196 } 225 }
197 buf += consumed; 226 buf += consumed;
198 } 227 }
199 /* didn't find a picture! */ 228 /* didn't find a picture! */