changeset 4249:ffedcd3d4bed libavformat

matroskadec: merge ByteIOContext declarations at upper level
author aurel
date Sun, 18 Jan 2009 17:26:24 +0000
parents 6e4ce186db2e
children 2fc899894f5e
files matroskadec.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Sun Jan 18 17:13:12 2009 +0000
+++ b/matroskadec.c	Sun Jan 18 17:26:24 2009 +0000
@@ -1118,6 +1118,7 @@
         uint8_t *extradata = NULL;
         int extradata_size = 0;
         int extradata_offset = 0;
+        ByteIOContext b;
 
         /* Apply some sanity checks. */
         if (track->type != MATROSKA_TRACK_TYPE_VIDEO &&
@@ -1201,7 +1202,6 @@
         } else if (!strcmp(track->codec_id, "A_MS/ACM")
                    && track->codec_priv.size >= 18
                    && track->codec_priv.data != NULL) {
-            ByteIOContext b;
             init_put_byte(&b, track->codec_priv.data, track->codec_priv.size,
                           URL_RDONLY, NULL, NULL, NULL, NULL);
             get_wav_header(&b, st->codec, track->codec_priv.size);
@@ -1244,7 +1244,6 @@
             } else
                 extradata_size = 2;
         } else if (codec_id == CODEC_ID_TTA) {
-            ByteIOContext b;
             extradata_size = 30;
             extradata = av_mallocz(extradata_size);
             if (extradata == NULL)
@@ -1266,8 +1265,6 @@
             track->audio.channels = 1;
         } else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK ||
                    codec_id == CODEC_ID_ATRAC3) {
-            ByteIOContext b;
-
             init_put_byte(&b, track->codec_priv.data,track->codec_priv.size,
                           0, NULL, NULL, NULL, NULL);
             url_fskip(&b, 24);