[FFmpeg-cvslog] avformat/utils: don't overwrite the return value of read_packet()
James Almer
git at videolan.org
Tue Feb 27 03:18:05 EET 2018
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Feb 26 00:18:53 2018 -0300| [f235359b2b1175585df757e6b60fabac29b8aa22] | committer: 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: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f235359b2b1175585df757e6b60fabac29b8aa22
---
libavformat/utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2c2ea876b6..72531d4185 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list