1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avformat/utils: don't overwrite the return value of read_packet()

This only affected demuxers that didn't return reference counted packets.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2018-02-26 00:18:53 -03:00
parent f4709f1b7b
commit f235359b2b

View File

@ -869,9 +869,9 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
if (!pkt->buf) {
AVPacket tmp = { 0 };
ret = av_packet_ref(&tmp, pkt);
if (ret < 0)
return ret;
err = av_packet_ref(&tmp, pkt);
if (err < 0)
return err;
*pkt = tmp;
}