summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-02-16 21:12:12 +0100
committerMartin Storsjö <martin@martin.st>2012-02-18 21:13:36 +0200
commit5be805d38cb43e6f0b85941f75946d09bc8cc13f (patch)
treefb9fb4ce920efd1285c1e1965dd1d82387359e29 /libavformat/movenc.c
parent3eec23f3cd7b0d8ef0a545089f75b55390a8ddb9 (diff)
downloadffmpeg-5be805d38cb43e6f0b85941f75946d09bc8cc13f.tar.gz
mov: Use defines for sample flags in fragments
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 22c918391c..30c3061d74 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2214,7 +2214,8 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track,
if (flags & MOV_TFHD_DEFAULT_FLAGS) {
track->default_sample_flags =
track->enc->codec_type == AVMEDIA_TYPE_VIDEO ?
- 0x01010000 : 0x02000000;
+ (MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES | MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC) :
+ MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO;
avio_wb32(pb, track->default_sample_flags);
}
@@ -2223,7 +2224,8 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track,
static uint32_t get_sample_flags(MOVTrack *track, MOVIentry *entry)
{
- return entry->flags & MOV_SYNC_SAMPLE ? 0x02000000 : 0x01010000;
+ return entry->flags & MOV_SYNC_SAMPLE ? MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO :
+ (MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES | MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC);
}
static int mov_write_trun_tag(AVIOContext *pb, MOVTrack *track)