[FFmpeg-devel] [PATCH 03/10] asfdec: remove some write-only values from the context

Anton Khirnov anton
Tue Feb 8 21:46:48 CET 2011


---
 libavformat/asfdec.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 039afdb..83aa6de 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -35,13 +35,10 @@ void ff_mms_set_stream_selection(URLContext *h, AVFormatContext *format);
 typedef struct {
     int asfid2avid[128];                 ///< conversion table from asf ID 2 AVStream ID
     ASFStream streams[128];              ///< it's max number and it's not that big
-    uint32_t stream_bitrates[128];       ///< max number of streams, bitrate for each (for streaming)
     char stream_languages[128][6];       ///< max number of streams, language for each (RFC1766, e.g. en-US)
     /* non streamed additonnal info */
-    uint64_t nb_packets;                 ///< how many packets are there in the file, invalid if broadcasting
     /* packet filling */
     int packet_size_left;
-    int packet_nb_frames;
     /* only for reading */
     uint64_t data_offset;                ///< beginning of the first data packet
     uint64_t data_object_offset;         ///< data object offset (excl. GUID & size)
@@ -232,7 +229,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
             ff_get_guid(pb, &asf->hdr.guid);
             asf->hdr.file_size          = get_le64(pb);
             asf->hdr.create_time        = get_le64(pb);
-            asf->nb_packets             = get_le64(pb);
+            get_le64(pb);                               /* number of packets */
             asf->hdr.play_time          = get_le64(pb);
             asf->hdr.send_time          = get_le64(pb);
             asf->hdr.preroll            = get_le32(pb);
@@ -444,7 +441,6 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
                 bitrate= get_le32(pb);
                 stream_id= (flags & 0x7f);
 //                av_log(s, AV_LOG_ERROR, "flags: 0x%x stream id %d, bitrate %d\n", flags, stream_id, bitrate);
-                asf->stream_bitrates[stream_id]= bitrate;
             }
         } else if (!ff_guidcmp(&g, &ff_asf_language_guid)) {
             int j;
@@ -1037,7 +1033,6 @@ static void asf_reset_header(AVFormatContext *s)
     ASFStream *asf_st;
     int i;
 
-    asf->packet_nb_frames = 0;
     asf->packet_size_left = 0;
     asf->packet_segments = 0;
     asf->packet_flags = 0;
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list