Commit 0e169d16 authored by Aurelien Jacobs's avatar Aurelien Jacobs

matroskadec: merge ByteIOContext declarations at upper level

Originally committed as revision 16673 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 68a71451
...@@ -1118,6 +1118,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1118,6 +1118,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
uint8_t *extradata = NULL; uint8_t *extradata = NULL;
int extradata_size = 0; int extradata_size = 0;
int extradata_offset = 0; int extradata_offset = 0;
ByteIOContext b;
/* Apply some sanity checks. */ /* Apply some sanity checks. */
if (track->type != MATROSKA_TRACK_TYPE_VIDEO && if (track->type != MATROSKA_TRACK_TYPE_VIDEO &&
...@@ -1201,7 +1202,6 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1201,7 +1202,6 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
} else if (!strcmp(track->codec_id, "A_MS/ACM") } else if (!strcmp(track->codec_id, "A_MS/ACM")
&& track->codec_priv.size >= 18 && track->codec_priv.size >= 18
&& track->codec_priv.data != NULL) { && track->codec_priv.data != NULL) {
ByteIOContext b;
init_put_byte(&b, track->codec_priv.data, track->codec_priv.size, init_put_byte(&b, track->codec_priv.data, track->codec_priv.size,
URL_RDONLY, NULL, NULL, NULL, NULL); URL_RDONLY, NULL, NULL, NULL, NULL);
get_wav_header(&b, st->codec, track->codec_priv.size); get_wav_header(&b, st->codec, track->codec_priv.size);
...@@ -1244,7 +1244,6 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1244,7 +1244,6 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
} else } else
extradata_size = 2; extradata_size = 2;
} else if (codec_id == CODEC_ID_TTA) { } else if (codec_id == CODEC_ID_TTA) {
ByteIOContext b;
extradata_size = 30; extradata_size = 30;
extradata = av_mallocz(extradata_size); extradata = av_mallocz(extradata_size);
if (extradata == NULL) if (extradata == NULL)
...@@ -1266,8 +1265,6 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -1266,8 +1265,6 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
track->audio.channels = 1; track->audio.channels = 1;
} else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK || } else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK ||
codec_id == CODEC_ID_ATRAC3) { codec_id == CODEC_ID_ATRAC3) {
ByteIOContext b;
init_put_byte(&b, track->codec_priv.data,track->codec_priv.size, init_put_byte(&b, track->codec_priv.data,track->codec_priv.size,
0, NULL, NULL, NULL, NULL); 0, NULL, NULL, NULL, NULL);
url_fskip(&b, 24); url_fskip(&b, 24);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment