[FFmpeg-devel] [PATCH] avformat/mov: mov_build_index: pick the bigger sample_size of the 2

Michael Niedermayer michaelni at gmx.at
Thu May 23 22:13:23 CEST 2013


Fixes Ticket2605

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavformat/mov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index d5e1f89..9497884 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2018,7 +2018,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
                 }
                 if (keyframe)
                     distance = 0;
-                sample_size = sc->alt_sample_size > 0 ? sc->alt_sample_size : sc->sample_sizes[current_sample];
+                sample_size = sc->alt_sample_size > 0 ? FFMAX(sc->alt_sample_size, sc->sample_size) : sc->sample_sizes[current_sample];
                 if (sc->pseudo_stream_id == -1 ||
                    sc->stsc_data[stsc_index].id - 1 == sc->pseudo_stream_id) {
                     AVIndexEntry *e = &st->index_entries[st->nb_index_entries++];
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list