[FFmpeg-cvslog] avformat/movenc: Check ff_put_wav_header() return code
Michael Niedermayer
git at videolan.org
Sat May 10 04:04:26 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 10 03:36:04 2014 +0200| [dc6b99d6b20e832a7d353474c2d093f8b2fb17d2] | committer: Michael Niedermayer
avformat/movenc: Check ff_put_wav_header() return code
Fixes CID1212260
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc6b99d6b20e832a7d353474c2d093f8b2fb17d2
---
libavformat/movenc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index bb0cb55..b3a7649 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -397,20 +397,24 @@ static int mov_pcm_be_gt16(enum AVCodecID codec_id)
static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track)
{
+ int ret;
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0);
avio_wl32(pb, track->tag); // store it byteswapped
track->enc->codec_tag = av_bswap16(track->tag >> 16);
- ff_put_wav_header(pb, track->enc, 0);
+ if ((ret = ff_put_wav_header(pb, track->enc, 0)) < 0)
+ return ret;
return update_size(pb, pos);
}
static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track)
{
+ int ret;
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0);
ffio_wfourcc(pb, "wfex");
- ff_put_wav_header(pb, track->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
+ if ((ret = ff_put_wav_header(pb, track->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX)) < 0)
+ return ret;
return update_size(pb, pos);
}
More information about the ffmpeg-cvslog
mailing list