avformat/movenc: Check ff_put_wav_header() return code
Fixes CID1212260 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8cc6e91f69
commit
dc6b99d6b2
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user