mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
[FFmpeg] Work around a bug with corrupted data
According to FFmpeg documentation, the out parameter is "set to size of parsed buffer or zero if not yet finished." however this is only the case if no error occurred; otherwise it is left untouched. We want the invalid content to generate a decoding error, so we set size to inputSize to ensure decoding failed later.
This commit is contained in:
parent
5567bd5369
commit
aeea23c315
1 changed files with 2 additions and 2 deletions
|
|
@ -181,8 +181,8 @@ FFmpegVideoDecoder<LIBAV_VER>::DoDecode(MediaRawData* aSample, bool* aGotFrame)
|
|||
#endif
|
||||
)) {
|
||||
while (inputSize) {
|
||||
uint8_t* data;
|
||||
int size;
|
||||
uint8_t* data = inputData;
|
||||
int size = inputSize;
|
||||
int len = mLib->av_parser_parse2(mCodecParser, mCodecContext, &data, &size,
|
||||
inputData, inputSize,
|
||||
aSample->mTime, aSample->mTimecode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue