aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-04-10 17:04:22 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-04-10 17:04:22 +0000
commita336965e703d3e5099dcc024a401f3cf44e3348a (patch)
tree95e7e0d9515396007763fb66213bb2f03c71c876
parentf1f7807abd46e4fa77f929eaedc044d3ec593cc5 (diff)
downloadffmpeg-a336965e703d3e5099dcc024a401f3cf44e3348a.tar.gz
fix edts for tracks without b frames
Originally committed as revision 5282 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/movenc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 66686ea1a5..b7d67959fa 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -946,7 +946,10 @@ static int mov_write_edts_tag(ByteIOContext *pb, MOVTrack *track)
put_be32(pb, av_rescale_rnd(track->trackDuration, globalTimescale, track->timescale, AV_ROUND_UP)); /* duration ... doesn't seem to effect psp */
- put_be32(pb, track->sampleDuration);
+ if (track->hasBframes)
+ put_be32(pb, track->sampleDuration); /* first pts is 1 */
+ else
+ put_be32(pb, 0);
put_be32(pb, 0x00010000);
return 0x24;
}