Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FFmpeg/FFmpeg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 44a7a6300d10
Choose a base ref
...
head repository: FFmpeg/FFmpeg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 594b1fcb28ec
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Sep 29, 2012

  1. mov: only print multiple edit lists warning for actually unsupported …

    …cases
    
    Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Sep 29, 2012
    Copy the full SHA
    3ceeb01 View commit details
  2. mov: add av_dlog() to dump edit lists.

    Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
    michaelni committed Sep 29, 2012
    Copy the full SHA
    594b1fc View commit details
Showing with 10 additions and 3 deletions.
  1. +10 −3 libavformat/mov.c
13 changes: 10 additions & 3 deletions libavformat/mov.c
Original file line number Diff line number Diff line change
@@ -2624,6 +2624,7 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
MOVStreamContext *sc;
int i, edit_count, version, edit_start_index = 0;
int unsupported = 0;

if (c->fc->nb_streams < 1)
return 0;
@@ -2636,29 +2637,35 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if ((uint64_t)edit_count*12+8 > atom.size)
return AVERROR_INVALIDDATA;

av_dlog(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
for (i=0; i<edit_count; i++){
int64_t time;
int64_t duration;
int rate;
if (version == 1) {
duration = avio_rb64(pb);
time = avio_rb64(pb);
} else {
duration = avio_rb32(pb); /* segment duration */
time = (int32_t)avio_rb32(pb); /* media time */
}
avio_rb32(pb); /* Media rate */
rate = avio_rb32(pb);
if (i == 0 && time == -1) {
sc->empty_duration = duration;
edit_start_index = 1;
} else if (i == edit_start_index && time >= 0)
sc->start_time = time;
else
unsupported = 1;

av_dlog(c->fc, "duration=%"PRId64" time=%"PRId64" rate=%f\n",
duration, time, rate / 65536.0);
}

if (edit_count > 1)
if (unsupported)
av_log(c->fc, AV_LOG_WARNING, "multiple edit list entries, "
"a/v desync might occur, patch welcome\n");

av_dlog(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
return 0;
}