Commit 542d6d28 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

avformat: set the "duration/length/ of a packet if known.

parent 12c7ab48
......@@ -377,6 +377,10 @@ static int Demux( demux_t *p_demux )
0 : (pkt.pts) * 1000000 *
p_sys->ic->streams[pkt.stream_index]->time_base.num /
p_sys->ic->streams[pkt.stream_index]->time_base.den - i_start_time;
if( pkt.duration > 0 )
p_frame->i_length = pkt.duration * 1000000 *
p_sys->ic->streams[pkt.stream_index]->time_base.num /
p_sys->ic->streams[pkt.stream_index]->time_base.den - i_start_time;
#ifdef AVFORMAT_DEBUG
msg_Dbg( p_demux, "tk[%d] dts=%"PRId64" pts=%"PRId64,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment