Commit 28ba69e0 authored by Aurelien Jacobs's avatar Aurelien Jacobs

matroskadec: cosmetics: placement of 'else if'

Originally committed as revision 14582 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7eb9b068
...@@ -1400,29 +1400,22 @@ matroska_read_header (AVFormatContext *s, ...@@ -1400,29 +1400,22 @@ matroska_read_header (AVFormatContext *s,
if (st == NULL) if (st == NULL)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
if (!strcmp(track->codec_id, if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC)
MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC) && && track->codec_priv.size >= 40
(track->codec_priv.size >= 40) && && track->codec_priv.data != NULL) {
(track->codec_priv.data != NULL)) {
track->video.fourcc = AV_RL32(track->codec_priv.data + 16); track->video.fourcc = AV_RL32(track->codec_priv.data + 16);
codec_id = codec_get_id(codec_bmp_tags, track->video.fourcc); codec_id = codec_get_id(codec_bmp_tags, track->video.fourcc);
} } else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_AUDIO_ACM)
else if (!strcmp(track->codec_id, && track->codec_priv.size >= 18
MATROSKA_CODEC_ID_AUDIO_ACM) && && track->codec_priv.data != NULL) {
(track->codec_priv.size >= 18) &&
(track->codec_priv.data != NULL)) {
uint16_t tag = AV_RL16(track->codec_priv.data); uint16_t tag = AV_RL16(track->codec_priv.data);
codec_id = codec_get_id(codec_wav_tags, tag); codec_id = codec_get_id(codec_wav_tags, tag);
} } else if (!strcmp(track->codec_id, "V_QUICKTIME")
&& (track->codec_priv.size >= 86)
else if (!strcmp(track->codec_id, "V_QUICKTIME") && && (track->codec_priv.data != NULL)) {
(track->codec_priv.size >= 86) &&
(track->codec_priv.data != NULL)) {
track->video.fourcc = AV_RL32(track->codec_priv.data); track->video.fourcc = AV_RL32(track->codec_priv.data);
codec_id=codec_get_id(codec_movvideo_tags, track->video.fourcc); codec_id=codec_get_id(codec_movvideo_tags, track->video.fourcc);
} } else if (codec_id == CODEC_ID_AAC && !track->codec_priv.size) {
else if (codec_id == CODEC_ID_AAC && !track->codec_priv.size) {
int profile = matroska_aac_profile(track->codec_id); int profile = matroska_aac_profile(track->codec_id);
int sri = matroska_aac_sri(track->audio.samplerate); int sri = matroska_aac_sri(track->audio.samplerate);
extradata = av_malloc(5); extradata = av_malloc(5);
...@@ -1438,8 +1431,7 @@ matroska_read_header (AVFormatContext *s, ...@@ -1438,8 +1431,7 @@ matroska_read_header (AVFormatContext *s,
extradata_size = 5; extradata_size = 5;
} else } else
extradata_size = 2; extradata_size = 2;
} } else if (codec_id == CODEC_ID_TTA) {
else if (codec_id == CODEC_ID_TTA) {
ByteIOContext b; ByteIOContext b;
extradata_size = 30; extradata_size = 30;
extradata = av_mallocz(extradata_size); extradata = av_mallocz(extradata_size);
...@@ -1453,18 +1445,14 @@ matroska_read_header (AVFormatContext *s, ...@@ -1453,18 +1445,14 @@ matroska_read_header (AVFormatContext *s,
put_le16(&b, track->audio.bitdepth); put_le16(&b, track->audio.bitdepth);
put_le32(&b, track->audio.out_samplerate); put_le32(&b, track->audio.out_samplerate);
put_le32(&b, matroska->ctx->duration * track->audio.out_samplerate); put_le32(&b, matroska->ctx->duration * track->audio.out_samplerate);
} } else if (codec_id == CODEC_ID_RV10 || codec_id == CODEC_ID_RV20 ||
else if (codec_id == CODEC_ID_RV10 || codec_id == CODEC_ID_RV20 ||
codec_id == CODEC_ID_RV30 || codec_id == CODEC_ID_RV40) { codec_id == CODEC_ID_RV30 || codec_id == CODEC_ID_RV40) {
extradata_offset = 26; extradata_offset = 26;
track->codec_priv.size -= extradata_offset; track->codec_priv.size -= extradata_offset;
} } else if (codec_id == CODEC_ID_RA_144) {
else if (codec_id == CODEC_ID_RA_144) {
track->audio.out_samplerate = 8000; track->audio.out_samplerate = 8000;
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; ByteIOContext b;
......
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