mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
avcodec/a64multienc: Assert that the Packet size does not grow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4da351ff0c
commit
29bbc1be48
@ -28,6 +28,7 @@
|
|||||||
#include "a64tables.h"
|
#include "a64tables.h"
|
||||||
#include "elbg.h"
|
#include "elbg.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/common.h"
|
#include "libavutil/common.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
|
|
||||||
@ -385,6 +386,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
pkt->pts = pkt->dts = c->next_pts;
|
pkt->pts = pkt->dts = c->next_pts;
|
||||||
c->next_pts = AV_NOPTS_VALUE;
|
c->next_pts = AV_NOPTS_VALUE;
|
||||||
|
|
||||||
|
av_assert0(pkt->size >= req_size);
|
||||||
pkt->size = req_size;
|
pkt->size = req_size;
|
||||||
pkt->flags |= AV_PKT_FLAG_KEY;
|
pkt->flags |= AV_PKT_FLAG_KEY;
|
||||||
*got_packet = !!req_size;
|
*got_packet = !!req_size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user