Mercurial > libavformat.hg
changeset 4869:b23a7b215104 libavformat
reindent
author | bcoudurier |
---|---|
date | Mon, 13 Apr 2009 03:32:02 +0000 |
parents | 8ee3deef8b44 |
children | f35f6f0b7fe7 |
files | utils.c |
diffstat | 1 files changed, 27 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Sun Apr 12 09:04:12 2009 +0000 +++ b/utils.c Mon Apr 13 03:32:02 2009 +0000 @@ -1848,34 +1848,34 @@ int got_picture, data_size, ret=0; AVFrame picture; - if(!st->codec->codec){ - codec = avcodec_find_decoder(st->codec->codec_id); - if (!codec) - return -1; - ret = avcodec_open(st->codec, codec); - if (ret < 0) - return ret; - } - - if(!has_codec_parameters(st->codec)){ - switch(st->codec->codec_type) { - case CODEC_TYPE_VIDEO: - ret = avcodec_decode_video2(st->codec, &picture, - &got_picture, avpkt); - break; - case CODEC_TYPE_AUDIO: - data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE); - samples = av_malloc(data_size); - if (!samples) - goto fail; - ret = avcodec_decode_audio3(st->codec, samples, - &data_size, avpkt); - av_free(samples); - break; - default: - break; + if(!st->codec->codec){ + codec = avcodec_find_decoder(st->codec->codec_id); + if (!codec) + return -1; + ret = avcodec_open(st->codec, codec); + if (ret < 0) + return ret; } - } + + if(!has_codec_parameters(st->codec)){ + switch(st->codec->codec_type) { + case CODEC_TYPE_VIDEO: + ret = avcodec_decode_video2(st->codec, &picture, + &got_picture, avpkt); + break; + case CODEC_TYPE_AUDIO: + data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE); + samples = av_malloc(data_size); + if (!samples) + goto fail; + ret = avcodec_decode_audio3(st->codec, samples, + &data_size, avpkt); + av_free(samples); + break; + default: + break; + } + } fail: return ret; }