Commit dc6b99d6 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenc: Check ff_put_wav_header() return code

Fixes CID1212260
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8cc6e91f
...@@ -397,20 +397,24 @@ static int mov_pcm_be_gt16(enum AVCodecID codec_id) ...@@ -397,20 +397,24 @@ static int mov_pcm_be_gt16(enum AVCodecID codec_id)
static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track) static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track)
{ {
int ret;
int64_t pos = avio_tell(pb); int64_t pos = avio_tell(pb);
avio_wb32(pb, 0); avio_wb32(pb, 0);
avio_wl32(pb, track->tag); // store it byteswapped avio_wl32(pb, track->tag); // store it byteswapped
track->enc->codec_tag = av_bswap16(track->tag >> 16); 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); return update_size(pb, pos);
} }
static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track) static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track)
{ {
int ret;
int64_t pos = avio_tell(pb); int64_t pos = avio_tell(pb);
avio_wb32(pb, 0); avio_wb32(pb, 0);
ffio_wfourcc(pb, "wfex"); 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); return update_size(pb, pos);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment