You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-14 22:15:12 +02:00
avcodec/mfenc: check IMFSample_ConvertToContiguousBuffer() for failure
Fixes: CID1591911 Logically dead code
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 86cd7c68bc
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -248,7 +248,7 @@ static int mf_sample_to_avpacket(AVCodecContext *avctx, IMFSample *sample, AVPac
|
|||||||
if ((ret = ff_get_encode_buffer(avctx, avpkt, len, 0)) < 0)
|
if ((ret = ff_get_encode_buffer(avctx, avpkt, len, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
IMFSample_ConvertToContiguousBuffer(sample, &buffer);
|
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return AVERROR_EXTERNAL;
|
return AVERROR_EXTERNAL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user