1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +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>
This commit is contained in:
Michael Niedermayer 2024-05-27 01:52:18 +02:00
parent 63ecce9ba8
commit 86cd7c68bc
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -249,7 +249,7 @@ static int mf_sample_to_avpacket(AVCodecContext *avctx, IMFSample *sample, AVPac
if ((ret = ff_get_encode_buffer(avctx, avpkt, len, 0)) < 0)
return ret;
IMFSample_ConvertToContiguousBuffer(sample, &buffer);
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer);
if (FAILED(hr))
return AVERROR_EXTERNAL;