@ -1549,7 +1549,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
decoded_data_size = ( ist - > st - > codec - > width * ist - > st - > codec - > height * 3 ) / 2 ;
decoded_data_size = ( ist - > st - > codec - > width * ist - > st - > codec - > height * 3 ) / 2 ;
/* XXX: allocate picture correctly */
/* XXX: allocate picture correctly */
avcodec_get_frame_defaults ( & picture ) ;
avcodec_get_frame_defaults ( & picture ) ;
ist - > st - > codec - > reordered_opaque = pkt_pts ;
avpkt . pts = pkt_pts ;
avpkt . dts = ist - > pts ;
pkt_pts = AV_NOPTS_VALUE ;
pkt_pts = AV_NOPTS_VALUE ;
ret = avcodec_decode_video2 ( ist - > st - > codec ,
ret = avcodec_decode_video2 ( ist - > st - > codec ,
@ -1561,7 +1562,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
/* no picture yet */
/* no picture yet */
goto discard_packet ;
goto discard_packet ;
}
}
ist - > next_pts = ist - > pts = guess_correct_pts ( & ist - > pts_ctx , picture . reordered_opaque , ist - > p ts) ;
ist - > next_pts = ist - > pts = guess_correct_pts ( & ist - > pts_ctx , picture . pkt_pts , picture . pkt_d ts) ;
if ( ist - > st - > codec - > time_base . num ! = 0 ) {
if ( ist - > st - > codec - > time_base . num ! = 0 ) {
int ticks = ist - > st - > parser ? ist - > st - > parser - > repeat_pict + 1 : ist - > st - > codec - > ticks_per_frame ;
int ticks = ist - > st - > parser ? ist - > st - > parser - > repeat_pict + 1 : ist - > st - > codec - > ticks_per_frame ;
ist - > next_pts + = ( ( int64_t ) AV_TIME_BASE *
ist - > next_pts + = ( ( int64_t ) AV_TIME_BASE *