On Wed, May 20, 2015 at 12:49:49AM +0200, Andreas Cadhalpun wrote: > nut->last_syncpoint_pos doesn't necessarily change between resync > attempts, so find_any_startcode can return the same startcode again. > > Thus remember where the last resync happened and don't try to resync > before that. > > This can't be done locally in nut_read_packet, because this wouldn't > prevent infinite resync loops, where after the resync a packet is > returned and while reading a following packet the resync happens again. > > Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > --- > libavformat/nut.h | 1 + > libavformat/nutdec.c | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/nut.h b/libavformat/nut.h > index 943081c..0c678a5 100644 > --- a/libavformat/nut.h > +++ b/libavformat/nut.h > @@ -102,6 +102,7 @@ typedef struct NUTContext { > unsigned int max_distance; > unsigned int time_base_count; > int64_t last_syncpoint_pos; > + int64_t last_resync_pos;
i think this and possibly some other fields must be reset on seeking otherwise resync after seeking could break [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel