[FFmpeg-cvslog] Merge commit '95ce02b35d3d1bb16111031df1d82a6e4d894d36'
James Almer
git at videolan.org
Wed Nov 8 00:18:21 EET 2017
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Nov 7 19:15:16 2017 -0300| [fe421d4deecd12e498e6f07b3fb6f83212c007b2] | committer: James Almer
Merge commit '95ce02b35d3d1bb16111031df1d82a6e4d894d36'
* commit '95ce02b35d3d1bb16111031df1d82a6e4d894d36':
rmdec: don't ignore the return value of av_get_packet()
See 65b83ce01b94eae944290c11257799a9288f2d4c
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe421d4deecd12e498e6f07b3fb6f83212c007b2
---
libavformat/rmdec.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index d6d7d9cd84..fea71a2fc9 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -950,12 +950,14 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
} else
return -1;
} else {
- if ((ret = av_get_packet(pb, pkt, len)) < 0)
+ ret = av_get_packet(pb, pkt, len);
+ if (ret < 0)
return ret;
rm_ac3_swap_bytes(st, pkt);
}
} else {
- if ((ret = av_get_packet(pb, pkt, len)) < 0)
+ ret = av_get_packet(pb, pkt, len);
+ if (ret < 0)
return ret;
}
@@ -973,16 +975,17 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
AVStream *st, RMStream *ast, AVPacket *pkt)
{
RMDemuxContext *rm = s->priv_data;
+ int ret;
av_assert0 (rm->audio_pkt_cnt > 0);
if (ast->deint_id == DEINT_ID_VBRF ||
ast->deint_id == DEINT_ID_VBRS) {
- int ret = av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
+ ret = av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
if (ret < 0)
return ret;
} else {
- int ret = av_new_packet(pkt, st->codecpar->block_align);
+ ret = av_new_packet(pkt, st->codecpar->block_align);
if (ret < 0)
return ret;
memcpy(pkt->data, ast->pkt.data + st->codecpar->block_align * //FIXME avoid this
======================================================================
diff --cc libavformat/rmdec.c
index d6d7d9cd84,b8ba24e928..fea71a2fc9
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@@ -954,10 -784,10 +955,11 @@@ ff_rm_parse_packet (AVFormatContext *s
return ret;
rm_ac3_swap_bytes(st, pkt);
}
- } else
+ } else {
- if ((ret = av_get_packet(pb, pkt, len)) < 0)
+ ret = av_get_packet(pb, pkt, len);
+ if (ret < 0)
return ret;
+ }
pkt->stream_index = st->index;
@@@ -973,16 -803,18 +975,17 @@@ ff_rm_retrieve_cache (AVFormatContext *
AVStream *st, RMStream *ast, AVPacket *pkt)
{
RMDemuxContext *rm = s->priv_data;
+ int ret;
- assert (rm->audio_pkt_cnt > 0);
+ av_assert0 (rm->audio_pkt_cnt > 0);
if (ast->deint_id == DEINT_ID_VBRF ||
ast->deint_id == DEINT_ID_VBRS) {
- int ret = av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
+ ret = av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
if (ret < 0)
return ret;
- }
- else {
+ } else {
- int ret = av_new_packet(pkt, st->codecpar->block_align);
+ ret = av_new_packet(pkt, st->codecpar->block_align);
if (ret < 0)
return ret;
memcpy(pkt->data, ast->pkt.data + st->codecpar->block_align * //FIXME avoid this
More information about the ffmpeg-cvslog
mailing list