[FFmpeg-devel] [PATCH] avformat/segment.c: add experimental -segment_list_flags iframe

Aman Gupta ffmpeg at tmm1.net
Wed May 21 10:40:11 CEST 2014


> +            seg->cur_entry.start_time = seg->is_first_pkt ? 0 : (double)pkt->pts * av_q2d(st->time_base);
> +            seg->cur_entry.start_pts = av_rescale_q(pkt->pts, st->time_base, AV_TIME_BASE_Q);
> +            seg->cur_entry.start_pos = oc->pb->pos == 0 ? 564 : oc->pb->pos;

Hardcoded 564 here because I couldn't figure out where the first video
packet in the file begins (i.e. where the header ends). The header is
flushed out lazily, so using ftell() still reports 0. 564 worked for
me, but the real value could be any multiple of 188.

  Aman


More information about the ffmpeg-devel mailing list