Commit fe421d4d authored by James Almer's avatar James Almer

Merge commit '95ce02b3'

* commit '95ce02b3':
  rmdec: don't ignore the return value of av_get_packet()

See 65b83ce0Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 85b9fe95 95ce02b3
......@@ -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
......
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