Cosmetics: Reindent Sierra vmd demuxer after last commit.

This commit is contained in:
Carl Eugen Hoyos 2013-05-05 19:56:46 +02:00
parent 4ec509ce3d
commit 7c23922c2b

View File

@ -106,28 +106,29 @@ static int vmd_read_header(AVFormatContext *s)
width = AV_RL16(&vmd->vmd_header[12]); width = AV_RL16(&vmd->vmd_header[12]);
height = AV_RL16(&vmd->vmd_header[14]); height = AV_RL16(&vmd->vmd_header[14]);
if (width && height) { if (width && height) {
if(vmd->vmd_header[24] == 'i' && vmd->vmd_header[25] == 'v' && vmd->vmd_header[26] == '3') if(vmd->vmd_header[24] == 'i' && vmd->vmd_header[25] == 'v' && vmd->vmd_header[26] == '3') {
vmd->is_indeo3 = 1; vmd->is_indeo3 = 1;
else } else {
vmd->is_indeo3 = 0; vmd->is_indeo3 = 0;
/* start up the decoders */ }
vst = avformat_new_stream(s, NULL); /* start up the decoders */
if (!vst) vst = avformat_new_stream(s, NULL);
return AVERROR(ENOMEM); if (!vst)
avpriv_set_pts_info(vst, 33, 1, 10); return AVERROR(ENOMEM);
vmd->video_stream_index = vst->index; avpriv_set_pts_info(vst, 33, 1, 10);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; vmd->video_stream_index = vst->index;
vst->codec->codec_id = vmd->is_indeo3 ? AV_CODEC_ID_INDEO3 : AV_CODEC_ID_VMDVIDEO; vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_tag = 0; /* no fourcc */ vst->codec->codec_id = vmd->is_indeo3 ? AV_CODEC_ID_INDEO3 : AV_CODEC_ID_VMDVIDEO;
vst->codec->width = width; vst->codec->codec_tag = 0; /* no fourcc */
vst->codec->height = height; vst->codec->width = width;
if(vmd->is_indeo3 && vst->codec->width > 320){ vst->codec->height = height;
vst->codec->width >>= 1; if(vmd->is_indeo3 && vst->codec->width > 320){
vst->codec->height >>= 1; vst->codec->width >>= 1;
} vst->codec->height >>= 1;
vst->codec->extradata_size = VMD_HEADER_SIZE; }
vst->codec->extradata = av_mallocz(VMD_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); vst->codec->extradata_size = VMD_HEADER_SIZE;
memcpy(vst->codec->extradata, vmd->vmd_header, VMD_HEADER_SIZE); vst->codec->extradata = av_mallocz(VMD_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
memcpy(vst->codec->extradata, vmd->vmd_header, VMD_HEADER_SIZE);
} }
/* if sample rate is 0, assume no audio */ /* if sample rate is 0, assume no audio */
@ -163,7 +164,7 @@ static int vmd_read_header(AVFormatContext *s)
den = st->codec->sample_rate * st->codec->channels; den = st->codec->sample_rate * st->codec->channels;
av_reduce(&num, &den, num, den, (1UL<<31)-1); av_reduce(&num, &den, num, den, (1UL<<31)-1);
if (vst) if (vst)
avpriv_set_pts_info(vst, 33, num, den); avpriv_set_pts_info(vst, 33, num, den);
avpriv_set_pts_info(st, 33, num, den); avpriv_set_pts_info(st, 33, num, den);
} }