Mercurial > libavformat.hg
diff rdt.c @ 4734:dfcf66d4a613 libavformat
Remove packet returning in ff_rm_parse_packet() if we're using the packet
cache, since this can already be accessed through ff_rm_retrieve_cache().
See "[PATCH] rmdec.c: remove cache access duplication" thread.
author | rbultje |
---|---|
date | Mon, 16 Mar 2009 12:57:49 +0000 |
parents | df35708c640a |
children | c0e7d62efe9c |
line wrap: on
line diff
--- a/rdt.c Mon Mar 16 12:50:12 2009 +0000 +++ b/rdt.c Mon Mar 16 12:57:49 2009 +0000 @@ -312,14 +312,16 @@ pos = url_ftell(&pb); if (res < 0) return res; - rdt->audio_pkt_cnt = res; - if (rdt->audio_pkt_cnt > 0 && - st->codec->codec_id == CODEC_ID_AAC) { + if (res > 0) { + if (st->codec->codec_id == CODEC_ID_AAC) { memcpy (rdt->buffer, buf + pos, len - pos); rdt->rmctx->pb = av_alloc_put_byte (rdt->buffer, len - pos, 0, NULL, NULL, NULL, NULL); + } + goto get_cache; } } else { +get_cache: rdt->audio_pkt_cnt = ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, rdt->rmst[st->index], pkt);