Message ID | e89042e4e8194af39309b75b9f700473@scisys.com |
---|---|
State | Superseded |
Headers | show |
On Mon, Dec 02, 2019 at 02:12:14PM +0000, Jörg Beckmann wrote: > After discussion with Carl Eugen, I replaced the "if" in line 7737 with an assert(). > > There is still the question, whether mov_switch_root() might be called when reading from a file. If someone is really really sure that it cannot happen at all, the check in mov_read_seek() could be removed. > > Jörg > > --- > libavformat/isom.h | 1 + > libavformat/mov.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- > 2 files changed, 50 insertions(+), 1 deletion(-) this patch seems to have been damaged Applying: Patch for memory optimization with QuickTime/MP4 error: corrupt patch at line 24 error: could not build fake ancestor Patch failed at 0001 Patch for memory optimization with QuickTime/MP4 [...]
> -----Ursprüngliche Nachricht----- > Von: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> Im Auftrag von Michael > Niedermayer > Gesendet: Montag, 2. Dezember 2019 21:54 > An: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> > Betreff: Re: [FFmpeg-devel] [PATCH v2] Patch for memory optimization with > QuickTime/MP4 > > On Mon, Dec 02, 2019 at 02:12:14PM +0000, Jörg Beckmann wrote: > > After discussion with Carl Eugen, I replaced the "if" in line 7737 with an assert(). > > > > There is still the question, whether mov_switch_root() might be called when > reading from a file. If someone is really really sure that it cannot happen at all, the > check in mov_read_seek() could be removed. > > > > Jörg > > > > --- > > libavformat/isom.h | 1 + > > libavformat/mov.c | 50 > > +++++++++++++++++++++++++++++++++++++++++++++++++- > > 2 files changed, 50 insertions(+), 1 deletion(-) > > this patch seems to have been damaged > I'll try it again. Thank you. > Applying: Patch for memory optimization with QuickTime/MP4 > error: corrupt patch at line 24 > error: could not build fake ancestor > Patch failed at 0001 Patch for memory optimization with QuickTime/MP4 > > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > "Nothing to hide" only works if the folks in power share the values of you and > everyone you know entirely and always will -- Tom Scott
diff --git a/libavformat/isom.h b/libavformat/isom.h index 4943b80ccf..9b4753f4d7 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -268,6 +268,7 @@ typedef struct MOVContext { int advanced_editlist; int ignore_chapters; int seek_individually; + int discard_fragments; int64_t next_root_atom; ///< offset of the next root atom int export_all; int export_xmp; diff --git a/libavformat/mov.c b/libavformat/mov.c index 7553a7fdfc..97c02725c5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7698,8 +7698,11 @@ static int should_retry(AVIOContext *pb, int error_code) { static int mov_switch_root(AVFormatContext *s, int64_t target, int index) { - int ret; + int ret, i; MOVContext *mov = s->priv_data; + AVStream *st = NULL; + MOVStreamContext *sc; + MOVFragment *frag; if (index >= 0 && index < mov->frag_index.nb_items) target = mov->frag_index.item[index].moof_offset; @@ -7721,6 +7724,44 @@ static int mov_switch_root(AVFormatContext *s, int64_t target, int index) mov->found_mdat = 0;