Re: [FFmpeg-devel] [PATCH] avformat/mpegts: fix resync logic stuck in 192 bytes

2020-05-20 Thread Marton Balint
On Wed, 20 May 2020, Michael Niedermayer wrote: On Tue, May 19, 2020 at 09:06:59PM +0200, Marton Balint wrote: pos47_full is not updated for every packet, and for unseekable inputs the resync logic might simply skip some 0x47 sync bytes. In order to detect these let's check for modulo instead

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: fix resync logic stuck in 192 bytes

2020-05-20 Thread Marton Balint
On Wed, 20 May 2020, Limin Wang wrote: On Wed, May 20, 2020 at 08:26:37AM +0200, Marton Balint wrote: On Wed, 20 May 2020, lance.lmw...@gmail.com wrote: >On Tue, May 19, 2020 at 09:06:59PM +0200, Marton Balint wrote: >>pos47_full is not updated for every packet, and for unseekable inputs t

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: fix resync logic stuck in 192 bytes

2020-05-20 Thread Michael Niedermayer
On Tue, May 19, 2020 at 09:06:59PM +0200, Marton Balint wrote: > pos47_full is not updated for every packet, and for unseekable inputs the > resync logic might simply skip some 0x47 sync bytes. In order to detect these > let's check for modulo instead of exact value. > > Also skip unrecognized syn

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: fix resync logic stuck in 192 bytes

2020-05-20 Thread Limin Wang
On Wed, May 20, 2020 at 08:26:37AM +0200, Marton Balint wrote: > > > On Wed, 20 May 2020, lance.lmw...@gmail.com wrote: > > >On Tue, May 19, 2020 at 09:06:59PM +0200, Marton Balint wrote: > >>pos47_full is not updated for every packet, and for unseekable inputs the > >>resync logic might simply

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: fix resync logic stuck in 192 bytes

2020-05-19 Thread Marton Balint
On Wed, 20 May 2020, lance.lmw...@gmail.com wrote: On Tue, May 19, 2020 at 09:06:59PM +0200, Marton Balint wrote: pos47_full is not updated for every packet, and for unseekable inputs the resync logic might simply skip some 0x47 sync bytes. In order to detect these let's check for modulo inst

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: fix resync logic stuck in 192 bytes

2020-05-19 Thread lance . lmwang
On Tue, May 19, 2020 at 09:06:59PM +0200, Marton Balint wrote: > pos47_full is not updated for every packet, and for unseekable inputs the > resync logic might simply skip some 0x47 sync bytes. In order to detect these > let's check for modulo instead of exact value. Before modifying and returning