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>
release/6.1
Michael Niedermayer 7 months ago
parent 74bacfc00b
commit adc6730d51
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavcodec/mfenc.c

@ -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)
return ret;
IMFSample_ConvertToContiguousBuffer(sample, &buffer);
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer);
if (FAILED(hr))
return AVERROR_EXTERNAL;

Loading…
Cancel
Save