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 * source_fps + 0.1 ) & 0x7fffffff;
+ int_position = ( int )( av_q2d( stream->time_base ) * pts * source_fps + 0.1 );
if ( pkt.pts == AV_NOPTS_VALUE )
{
self->invalid_pts_counter++;
if ( pkt.dts != AV_NOPTS_VALUE )
{
double delay = mlt_properties_get_double( properties, "video_delay" );
- int_position = ( int64_t )( ( av_q2d( stream->time_base ) * pkt.dts + delay ) * source_fps + 0.5 ) & 0x7fffffff;
+ int_position = ( int )( ( av_q2d( stream->time_base ) * pkt.dts + delay ) * source_fps + 0.5 );
if ( context->start_time != AV_NOPTS_VALUE )
- int_position -= ( int64_t )( context->start_time * source_fps / AV_TIME_BASE + 0.5 ) & 0x7fffffff;
+ int_position -= ( int )( context->start_time * source_fps / AV_TIME_BASE + 0.5 );
if ( int_position == self->last_position )
int_position = self->last_position + 1;
}
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 * source_fps + 0.1 ) & 0x7fffffff;
+ int_position = ( int )( av_q2d( stream->time_base) * pts * source_fps + 0.1 );
mlt_log_debug( MLT_PRODUCER_SERVICE(producer), "got frame %d, key %d\n", int_position, self->av_frame->key_frame );
}
// Handle ignore
{
double current_pts = av_q2d( context->streams[ index ]->time_base ) * pkt.pts;
int req_position = ( int )( timecode * fps + 0.5 );
- int int_position = ( int64_t )( current_pts * fps + 0.5 ) & 0x7fffffff;
+ int int_position = ( int )( current_pts * fps + 0.5 );
if ( context->start_time != AV_NOPTS_VALUE )
- int_position -= ( int64_t )( fps * context->start_time / AV_TIME_BASE + 0.5 ) & 0x7fffffff;
+ int_position -= ( int )( fps * context->start_time / AV_TIME_BASE + 0.5 );
if ( *ignore == 0 )
{