summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-03-16 15:08:49 +0200
committerMartin Storsjö <martin@martin.st>2015-03-19 10:27:17 +0200
commit5c337353a2546416631a87de4881850d99141c39 (patch)
treeae7c0ee753d176bba178e1970362563ea880ff10 /libavformat/movenc.c
parenteee13d653953083553cceadbbedf6222ef78a006 (diff)
movenc: Move sidx edit list timestamp adjustment into a block
When reading these values from track->frag_info, the same adjustment has already been done. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 85d865e28d..b6dd456a95 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2727,15 +2727,15 @@ static int mov_write_sidx_tag(AVIOContext *pb,
duration = track->start_dts + track->track_duration -
track->cluster[0].dts;
starts_with_SAP = track->cluster[0].flags & MOV_SYNC_SAMPLE;
+
+ // pts<0 should be cut away using edts
+ if (presentation_time < 0)
+ presentation_time = 0;
} else {
entries = track->nb_frag_info;
presentation_time = track->frag_info[0].time;
}
- // pts<0 should be cut away using edts
- if (presentation_time < 0)
- presentation_time = 0;
-
avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "sidx");
avio_w8(pb, 1); /* version */