Commit 5e965582 authored by Sasi Inguva's avatar Sasi Inguva Committed by Rostislav Pehlivanov

lavf/mov.c: Use the correct timescale when seeking for audio.

Signed-off-by: 's avatarSasi Inguva <isasi@google.com>
Reviewed-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent 894e7ef9
......@@ -3028,7 +3028,7 @@ static void mov_fix_index(MOVContext *mov, AVStream *st)
// Audio decoders like AAC need need a decoder delay samples previous to the current sample,
// to correctly decode this frame. Hence for audio we seek to a frame 1 sec. before the
// edit_list_media_time to cover the decoder delay.
search_timestamp = FFMAX(search_timestamp - mov->time_scale, e_old[0].timestamp);
search_timestamp = FFMAX(search_timestamp - msc->time_scale, e_old[0].timestamp);
}
index = find_prev_closest_keyframe_index(st, e_old, nb_old, search_timestamp, 0);
......
......@@ -4,7 +4,8 @@ FATE_MOV = fate-mov-3elist \
fate-mov-1elist-noctts \
fate-mov-elist-starts-ctts-2ndsample \
fate-mov-1elist-ends-last-bframe \
fate-mov-2elist-elist1-ends-bframe
fate-mov-2elist-elist1-ends-bframe \
fate-mov-aac-2048-priming
FATE_SAMPLES_AVCONV += $(FATE_MOV)
......@@ -26,3 +27,6 @@ fate-mov-1elist-ends-last-bframe: CMD = framemd5 -i $(TARGET_SAMPLES)/mov/mov-1e
# Makes sure that we handle timestamps of packets in case of multiple edit lists with one of them ending on a B-frame correctly.
fate-mov-2elist-elist1-ends-bframe: CMD = framemd5 -i $(TARGET_SAMPLES)/mov/mov-2elist-elist1-ends-bframe.mov
fate-mov-aac-2048-priming: ffprobe$(PROGSSUF)$(EXESUF)
fate-mov-aac-2048-priming: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_packets -print_format compact $(TARGET_SAMPLES)/mov/aac-2048-priming.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