Revision 346db3ef libavcodec/h264_parser.c

View differences:

libavcodec/h264_parser.c
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 224
            return 0; /* no need to evaluate the rest */
196 225
        }
197 226
        buf += consumed;

Also available in: Unified diff