Revision 71c47d6e libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
267 267
    dst->type= FF_BUFFER_TYPE_COPY;
268 268
}
269 269

  
270
static void copy_picture_attributes(AVFrame *dst, AVFrame *src){
271
    dst->pict_type              = src->pict_type;
272
    dst->quality                = src->quality;
273
    dst->coded_picture_number   = src->coded_picture_number;
274
    dst->display_picture_number = src->display_picture_number;
275
//    dst->reference              = src->reference;
276
    dst->pts                    = src->pts;
277
    dst->interlaced_frame       = src->interlaced_frame;
278
    dst->top_field_first        = src->top_field_first;
279
}
280

  
270 281
/**
271 282
 * allocates a Picture
272 283
 * The pixels are allocated/set by calling get_buffer() if shared=0
......
1631 1642
            }
1632 1643
        }
1633 1644
    }
1634
    pic->quality= pic_arg->quality;
1635
    pic->pict_type= pic_arg->pict_type;
1636
    pic->pts = pic_arg->pts;
1637
    pic->interlaced_frame = pic_arg->interlaced_frame;
1638
    pic->top_field_first = pic_arg->top_field_first;
1639

  
1645
    copy_picture_attributes(pic, pic_arg);
1646
    
1640 1647
    if(s->input_picture[encoding_delay])
1641 1648
        pic->display_picture_number= s->input_picture[encoding_delay]->display_picture_number + 1;
1642 1649
    
......
1754 1761
                s->reordered_input_picture[0]->data[i]= NULL;
1755 1762
            s->reordered_input_picture[0]->type= 0;
1756 1763
            
1757
            //FIXME bad, copy * except
1758
            pic->pict_type = s->reordered_input_picture[0]->pict_type;
1759
            pic->quality   = s->reordered_input_picture[0]->quality;
1760
            pic->coded_picture_number = s->reordered_input_picture[0]->coded_picture_number;
1761
            pic->reference = s->reordered_input_picture[0]->reference;
1762
	    pic->pts = s->reordered_input_picture[0]->pts;
1764
            copy_picture_attributes((AVFrame*)pic, (AVFrame*)s->reordered_input_picture[0]);
1765
            pic->reference              = s->reordered_input_picture[0]->reference;
1763 1766
            
1764 1767
            alloc_picture(s, pic, 0);
1765 1768

  
......
1806 1809
    
1807 1810
    /* output? */
1808 1811
    if(s->new_picture.data[0]){
1809

  
1810 1812
        s->pict_type= s->new_picture.pict_type;
1811 1813
//emms_c();
1812 1814
//printf("qs:%f %f %d\n", s->new_picture.quality, s->current_picture.quality, s->qscale);

Also available in: Unified diff