[FFmpeg-devel] [PATCH 3/3] wtvenc: output ff_format_none if ff_put_wav_header fails

Peter Ross pross at xvid.org
Mon Dec 23 10:39:50 CET 2013


This occurs when muxing E-AC-3.

Signed-off-by: Peter Ross <pross at xvid.org>
---
 libavformat/wtvenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index c1066e1..5e3b9b9 100644
--- a/libavformat/wtvenc.c
+++ b/libavformat/wtvenc.c
@@ -298,7 +298,8 @@ static int write_stream_codec_info(AVFormatContext *s, AVStream *st)
     if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         put_videoinfoheader2(pb, st);
     } else {
-        ff_put_wav_header(pb, st->codec);
+        if (ff_put_wav_header(pb, st->codec) < 0)
+            format_type = &ff_format_none;
     }
     hdr_size = avio_tell(pb) - hdr_pos_start;
 
-- 
1.8.3.2

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131223/f787199a/attachment.asc>


More information about the ffmpeg-devel mailing list