summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-11 13:30:37 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-11 13:30:37 +0000
commitb596102e7e5bdd5207f0a62e7b76b730bd9623be (patch)
treeb98aae6b8f3a4f53f1950065e68fbc9d2d336fdc /libavformat/movenc.c
parent2f5560ee499a9da68862977e3771537bf5379052 (diff)
check codec frame size directly and only for audio
Originally committed as revision 7280 to svn://svn.ffmpeg.org/ffmpeg/trunk
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 736d1594a0..1cc27199f8 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1518,10 +1518,10 @@ static int mov_write_header(AVFormatContext *s)
default:
track->sampleSize = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels;
}
- }
- if (!track->sampleDuration) {
- av_log(s, AV_LOG_ERROR, "track %d: sample duration is not set\n", i);
- return -1;
+ if (!st->codec->frame_size) {
+ av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i);
+ return -1;
+ }
}
}