[FFmpeg-devel] Collection of patches

Thorsten Jordan tjordan
Wed Apr 23 09:23:14 CEST 2008


Thorsten Jordan schrieb:
> Michael Niedermayer schrieb:
>> On Tue, Apr 22, 2008 at 12:36:02PM +0200, Thorsten Jordan wrote:
>> [...]
>>> So thanks for reading so far and here are the patches:
>>>
>>> Make AVCHD (mts) files give better PTS values, as PCR packets are
>>> scanned ignoring the mts<->ts difference:
>>> mts_pcr_parse_syncbyte_check.patch
>> mans ?
> it may look a bit hackish but shows up a problem when decoding .mts
> files, as they are not handled specially by ffmpeg. The TS demuxer just
> scans for the next 0x47 startcode, skipping the 4 bytes of the counter
> that are stored in each mts-"packet" before the TS part. Since the first
> byte of that counter is <= 0x3f, that patch should be valid (it can
> never be 0x47). Imho the demuxer should handle mts specially, because
> what if any of the bytes 1-3 of that counter are 0x47 by coincidence?

just one more thought: there are some reports with problems of
AVCHD-playback like small artifacts. What if a TS packet is not decoded
because its header isnt found correctly inside the 192 byte of a
mts-"packet", because one of the bytes 1-3 in the 4-byte mts counter
preceding the TS packet is 0x47? the ts packet would surely be skipped
and the decoder misses that chunk of data. Seems a rare case, but could
that happen? People would scan for errors in the wrong corner, namely
the decoder or claim the file to be broken because the demuxed elemtary
stream wouldnt be complete...

-- 
Regard, Thorsten




More information about the ffmpeg-devel mailing list