mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-06 09:22:36 +08: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:
@@ -869,9 +869,9 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
|
|
||||||
if (!pkt->buf) {
|
if (!pkt->buf) {
|
||||||
AVPacket tmp = { 0 };
|
AVPacket tmp = { 0 };
|
||||||
ret = av_packet_ref(&tmp, pkt);
|
err = av_packet_ref(&tmp, pkt);
|
||||||
if (ret < 0)
|
if (err < 0)
|
||||||
return ret;
|
return err;
|
||||||
*pkt = tmp;
|
*pkt = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user