Commit 54f8ac19 authored by Sasi Inguva's avatar Sasi Inguva Committed by Michael Niedermayer

lavf/mov.c: Don't correct edit list start to zero, when we can't find a frame...

lavf/mov.c: Don't correct edit list start to zero, when we can't find a frame before edit list start.

After c2a8f0fc this can happen on normal edit lists starting on a B-frame.
Signed-off-by: 's avatarSasi Inguva <isasi@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 01763144
......@@ -3380,13 +3380,11 @@ static void mov_fix_index(MOVContext *mov, AVStream *st)
if (find_prev_closest_index(st, e_old, nb_old, ctts_data_old, ctts_count_old, search_timestamp, AVSEEK_FLAG_ANY,
&index, &ctts_index_old, &ctts_sample_old) < 0) {
av_log(mov->fc, AV_LOG_WARNING,
"st: %d edit list %"PRId64" Cannot find an index entry before timestamp: %"PRId64".\n"
"Rounding edit list media time to zero.\n",
"st: %d edit list %"PRId64" Cannot find an index entry before timestamp: %"PRId64".\n",
st->index, edit_list_index, search_timestamp);
index = 0;
ctts_index_old = 0;
ctts_sample_old = 0;
edit_list_media_time = 0;
}
}
current = e_old + index;
......
......@@ -12,6 +12,7 @@ FATE_MOV = fate-mov-3elist \
fate-mov-ibi-elst-starts-b \
fate-mov-elst-ends-betn-b-and-i \
fate-mov-frag-overlap \
fate-mov-bbi-elst-starts-b \
FATE_MOV_FFPROBE = fate-mov-aac-2048-priming \
fate-mov-zombie \
......@@ -63,6 +64,11 @@ fate-mov-ibi-elst-starts-b: CMD = framemd5 -flags +bitexact -i $(TARGET_SAMPLES)
# Makes sure that we handle overlapping framgments
fate-mov-frag-overlap: CMD = framemd5 -i $(TARGET_SAMPLES)/mov/frag_overlap.mp4
# Makes sure that we pick the right frames according to edit list when there is no keyframe with PTS < edit list start.
# For example, when video starts on a B-frame, and edit list starts on that B-frame too.
# GOP structure : B B I in presentation order.
fate-mov-bbi-elst-starts-b: CMD = framemd5 -flags +bitexact -i $(TARGET_SAMPLES)/h264/twofields_packet.mp4
fate-mov-aac-2048-priming: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_packets -print_format compact $(TARGET_SAMPLES)/mov/aac-2048-priming.mov
fate-mov-zombie: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_streams -show_packets -show_frames -bitexact -print_format compact $(TARGET_SAMPLES)/mov/white_zombie_scrunch-part.mov
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment