[FFmpeg-devel] More problems with mts files (AVCHD), PCR parsing making wrong assumptions
Thorsten Jordan
tjordan
Fri Feb 15 16:54:05 CET 2008
Hello,
i encountered some weird pts values when opening mts files with
libavformat and went deep debugging.
I don't know if it was intended that plain mts files can be read with
the mpegts parser (those files consist of 192-byte chunks with 4
counter-like bytes then a 188-byte ts packet follows), but if it should
work, then there is a bug:
libavformat/mpegts.c
parse_pcr gets the packet's data (line 1317 of mpegts.c), which doesn't
start with 0x47 in that case, but it just reads the PCR data as it would
be a TS packet (and not mts), causing wrong PCR values. Since these
values are used as st->cur_dts they wander into pkt->pts / pkt->dts and
are delivered by av_read_frame ...
--
Regards, Thorsten
More information about the ffmpeg-devel
mailing list