diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-06 15:45:42 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-08 11:32:33 +0200 |
commit | d393c45051ddaf6146e7e29ec2ea97035a727529 (patch) | |
tree | a8e0c803d6741db421d6665bea278e4b3f50612f /tests/dnn/dnn-layer-dense-test.c | |
parent | 6e8e9b7633d8b755e7a464a10ba5047f31cbd84d (diff) | |
download | ffmpeg-d393c45051ddaf6146e7e29ec2ea97035a727529.tar.gz |
avcodec/mpegvideo_enc: Don't segfault on unorthodox mpeg_quant
The (deprecated) field AVCodecContext.mpeg_quant has no range
restriction; MpegEncContext.mpeg_quant is restricted to 0..1.
If the former is set, the latter is overwritten with it without
checking the range. This can trigger an av_assert2() with the MPEG-4
encoder when writing said field.
Fix this by just setting MpegEncContext.mpeg_quant to 1 if
AVCodecContext.mpeg_quant is set.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'tests/dnn/dnn-layer-dense-test.c')
0 files changed, 0 insertions, 0 deletions