diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2008-12-28 05:55:09 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2008-12-28 05:55:09 +0000 |
commit | 5d88c2647def2557637077e9284cfe9806954502 (patch) | |
tree | 2fdbe9180355f6d2d686943ca9aca247ae2f20da /libavformat | |
parent | 886e89d0d05ad99064e9d739e9b26beb71d79f29 (diff) | |
download | ffmpeg-5d88c2647def2557637077e9284cfe9806954502.tar.gz |
Change audio_pkt_cnt from an array into a single field, since only a single
member of the array is ever used (compare to RMDemuxContext->audio_pkt_cnt).
See "[PATCH] oops I broke rdt.c" mailinglist thread.
Originally committed as revision 16367 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rdt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c index e90b565f90..4bcb967ae0 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -85,7 +85,7 @@ struct PayloadContext { uint8_t *mlti_data; unsigned int mlti_data_size; char buffer[RTP_MAX_PACKET_LENGTH + FF_INPUT_BUFFER_PADDING_SIZE]; - int audio_pkt_cnt[MAX_STREAMS]; /**< remaining audio packets in rmdec */ + int audio_pkt_cnt; /**< remaining audio packets in rmdec */ }; void @@ -307,8 +307,8 @@ rdt_parse_packet (PayloadContext *rdt, AVStream *st, pos = url_ftell(&pb); if (res < 0) return res; - rdt->audio_pkt_cnt[st->id] = res; - if (rdt->audio_pkt_cnt[st->id] > 0 && + rdt->audio_pkt_cnt = res; + if (rdt->audio_pkt_cnt > 0 && 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, @@ -316,14 +316,14 @@ rdt_parse_packet (PayloadContext *rdt, AVStream *st, } } else { ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb, st, rdt->rmst[0], pkt); - if (rdt->audio_pkt_cnt[st->id] == 0 && + if (rdt->audio_pkt_cnt == 0 && st->codec->codec_id == CODEC_ID_AAC) av_freep(&rdt->rmctx->pb); } pkt->stream_index = st->index; pkt->pts = *timestamp; - return rdt->audio_pkt_cnt[st->id] > 0; + return rdt->audio_pkt_cnt > 0; } int |