From 9f9c45f4b635457543a3bc37b09a679daa9dabea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Mon, 23 Jan 2012 14:56:56 +0200 Subject: [PATCH] movenc: Don't require frame_size to be set for modes other than mov MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The field frame_size isn't written to the output anywhere except than in mov. This facilitates stream copy from formats that don't set frame_size. Signed-off-by: Martin Storsjö --- libavformat/movenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 5e8bed2..48b474b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2757,7 +2757,7 @@ static int mov_write_header(AVFormatContext *s) } /* set audio_vbr for compressed audio */ if (av_get_bits_per_sample(st->codec->codec_id) < 8) { - if (!st->codec->frame_size) { + if (!st->codec->frame_size && track->mode == MODE_MOV) { av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i); goto error; } -- 2.7.4