mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-22 07:13:20 +00:00
Merge commit '7c710c38f6481b892e01d3c1e4781ad160b2935e' into release/2.4
* commit '7c710c38f6481b892e01d3c1e4781ad160b2935e':
audiointerleave: check av_new_packet return value
Conflicts:
libavformat/audiointerleave.c
See: 3ca8a23288
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
298f7f1fac
@ -80,13 +80,14 @@ static int interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
|
|||||||
{
|
{
|
||||||
AVStream *st = s->streams[stream_index];
|
AVStream *st = s->streams[stream_index];
|
||||||
AudioInterleaveContext *aic = st->priv_data;
|
AudioInterleaveContext *aic = st->priv_data;
|
||||||
|
int ret;
|
||||||
int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_size);
|
int size = FFMIN(av_fifo_size(aic->fifo), *aic->samples * aic->sample_size);
|
||||||
if (!size || (!flush && size == av_fifo_size(aic->fifo)))
|
if (!size || (!flush && size == av_fifo_size(aic->fifo)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (av_new_packet(pkt, size) < 0)
|
ret = av_new_packet(pkt, size);
|
||||||
return AVERROR(ENOMEM);
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
av_fifo_generic_read(aic->fifo, pkt->data, size, NULL);
|
av_fifo_generic_read(aic->fifo, pkt->data, size, NULL);
|
||||||
|
|
||||||
pkt->dts = pkt->pts = aic->dts;
|
pkt->dts = pkt->pts = aic->dts;
|
||||||
|
Loading…
Reference in New Issue
Block a user