On Tue, Sep 27, 2016 at 09:28:13 -0700, Sasi Inguva wrote: > if (curr_cts < edit_list_media_time || curr_cts >= > (edit_list_duration + edit_list_media_time)) { > - if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && > curr_cts < edit_list_media_time && > - curr_cts + frame_duration > edit_list_media_time && > - st->skip_samples == 0 && msc->start_pad == 0) { > - st->skip_samples = msc->start_pad = edit_list_media_time > - curr_cts; > - > - // Shift the index entry timestamp by skip_samples to be > correct. > - edit_list_dts_counter -= st->skip_samples; > + if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && > st->codecpar->codec_id != AV_CODEC_ID_VORBIS && > + curr_cts < edit_list_media_time && curr_cts + > frame_duration > edit_list_media_time && > + first_non_zero_audio_edit > 0) { > + packet_skip_samples = edit_list_media_time - curr_cts; > + st->skip_samples += packet_skip_samples; > + > + // Shift the index entry timestamp by > packet_skip_samples to be correct. > + edit_list_dts_counter -= packet_skip_samples; > if (edit_list_start_encountered == 0) { > - edit_list_start_encountered = 1; > + edit_list_start_encountered = 1; > + // Make timestamps strictly monotonically increasing > for audio, by rewriting timestamps for > + // discarded packets. > + if (frame_duration_buffer) { > + fix_index_entry_timestamps(st, > st->nb_index_entries, edit_list_dts_counter, > + frame_duration_buffer, > num_discarded_begin); > + av_freep(&frame_duration_buffer); > + }
Something's fishy with your indentation here. > + if (!frame_duration_buffer) { > + av_log(mov->fc, AV_LOG_ERROR, "Cannot reallocate > frame duration buffer\n"); > + break; > + } I fail to see the whole code block (and I have problems applying the patch). What is this breaking from? Moritz _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel