diff options
author | Ronald S. Bultje | 2009-03-16 12:57:49 +0000 |
---|---|---|
committer | Ronald S. Bultje | 2009-03-16 12:57:49 +0000 |
commit | c5efef7be9a088f2cf4db0d2cf4920da9fa3e0a8 (patch) | |
tree | c171d432dd936f37e5e86a8408e8ecbeb53e7d11 /libavformat/rdt.c | |
parent | 748a4312b45ad1772713941f57aecb87a9aef20f (diff) |
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.
Originally committed as revision 18009 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rdt.c')
-rw-r--r-- | libavformat/rdt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c index c96ed4a607..197f9db46e 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -312,14 +312,16 @@ rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st, 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); |