Commit f235359b authored by James Almer's avatar James Almer

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

This only affected demuxers that didn't return reference counted packets.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent f4709f1b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment