[PATCH] fixup mpegts_get_pcr to be more reliable
Hi, Here are a few patches i created while trying to figure out why a file "locked" up in mpegts_get_pcr on seek. I don't seem to learn that patches to the mpegts demuxer have a tendency to get lost in the void. Anyway... 0001: The code for backwords pcr searching could never be reached, so remove it. 0002: Respect the maximum stream position that the function is allowed to process. 0003: Make sure the return value of url_seek is respected 0004: Reindent after the above 0005: Make mpegts_get_pcr resync to stream if the position it is asked to look for a timestamp isn't on a mpegts syncword. ---- The real issue I found out later is that this particlar stream doesn't contain any packets with pid = pcr_pid, so it reads the whole file to attempt to find a starting timestamp for av_gen_search. Are the pid's for the pcr supposed to be listed in PMT? I haven't checked this yet, but i suspect the given pid isn't available in there either. Maybe it should be reset to -1 if the pid isn't found? Regards Joakim
On Wed, Aug 27, 2008 at 09:15:23PM +0200, elupus wrote:
Hi,
Here are a few patches i created while trying to figure out why a file "locked" up in mpegts_get_pcr on seek. I don't seem to learn that patches to the mpegts demuxer have a tendency to get lost in the void. Anyway...
0001: The code for backwords pcr searching could never be reached, so remove it.
0002: Respect the maximum stream position that the function is allowed to process.
0003: Make sure the return value of url_seek is respected
0004: Reindent after the above
0005: Make mpegts_get_pcr resync to stream if the position it is asked to look for a timestamp isn't on a mpegts syncword.
all applied, thanks and sorry for the delay [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time.
participants (2)
-
elupus@ecce.se -
Michael Niedermayer