+ // Get position of reordered frame
+ int_position = self->av_frame->reordered_opaque;
+#if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(106<<8)+0))
+ pts = best_pts( self, self->av_frame->pkt_pts, self->av_frame->pkt_dts );
+ if ( pts != AV_NOPTS_VALUE )
+ {
+ if ( self->first_pts != AV_NOPTS_VALUE )
+ pts -= self->first_pts;
+ else if ( context->start_time != AV_NOPTS_VALUE )
+ pts -= context->start_time;
+ int_position = ( int64_t )( ( av_q2d( stream->time_base ) * pts + delay ) * source_fps + 0.5 );
+ }
+#endif