[FFmpeg-cvslog] r16367 - trunk/libavformat/rdt.c

rbultje subversion
Sun Dec 28 06:55:09 CET 2008


Author: rbultje
Date: Sun Dec 28 06:55:09 2008
New Revision: 16367

Log:
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.

Modified:
   trunk/libavformat/rdt.c

Modified: trunk/libavformat/rdt.c
==============================================================================
--- trunk/libavformat/rdt.c	Sun Dec 28 01:21:11 2008	(r16366)
+++ trunk/libavformat/rdt.c	Sun Dec 28 06:55:09 2008	(r16367)
@@ -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, A
         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, A
         }
     } 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




More information about the ffmpeg-cvslog mailing list