[FFmpeg-devel] frames not parsed correctly for VOB file (mpeg2)

Christian Cier-Zniewski christian.cier
Thu Feb 4 10:02:09 CET 2010


Michael Niedermayer schrieb:
> On Wed, Feb 03, 2010 at 10:05:10PM +0100, Christian Cier-Zniewski wrote:
>> Michael Niedermayer schrieb:
>>> Outputing 1 field per packet solves this with the old code for
>>> compute_pkt_fields()
>>>   
>> Please find attached the old code replacing the current one.
> 
> you are quick :)

This first version of the patch was meant as a starting point.

>> +	s->parity = 0;
> 
> tabs are forbidden in our svn

Sorry, won't happen again.

>>                                  s->repeat_pict = 2;
>>                              }
>>                          }
>> +						
>> +						/* the packet only represents half a frame
>> +                           XXX,FIXME maybe find a different solution */
>> +                        if(picture_structure != 3){
>> +                            s->repeat_pict = -1;
>> +                            s->parity = picture_structure-1;
>> +                        }else
>> +                            s->parity = !top_field_first;
> the code above back then looked like:
>                         if (repeat_first_field) {
>                             if (pc->progressive_sequence) {
>                                 if (top_field_first)
>                                     s->repeat_pict = 4;
>                                 else
>                                     s->repeat_pict = 2;
>                             } else if (progressive_frame) {
>                                 s->repeat_pict = 1;
>                             }
>                         }
> 
> now its different, repeat_pict is off by 1
> it does not seem you adapted your code, also beware there are 2 repeat_pict
> variables

Yes, I am aware of that change and forgot to ask about that. Could you 
please summarize the intention of this change?







More information about the ffmpeg-devel mailing list