diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-07-02 23:33:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-07-02 23:33:10 +0000 |
commit | 89ac23cd4000dccb366217a431c5fd6783043759 (patch) | |
tree | 51a1684d493b468d74407445384b33e80905c6ff /libavformat/avidec.c | |
parent | 5245c04da332ab9585133ad55f8ec7a06d43b0b0 (diff) | |
download | ffmpeg-streaming-89ac23cd4000dccb366217a431c5fd6783043759.zip ffmpeg-streaming-89ac23cd4000dccb366217a431c5fd6783043759.tar.gz |
Rename block_align variable in the avi demuxer to clearly seperate its purpose
from the true block_align.
Originally committed as revision 24011 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 0341f18..ec24a6e 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -48,7 +48,7 @@ typedef struct AVIStream { int prefix_count; uint32_t pal[256]; int has_pal; - int block_align; ///< AVCodecContext.block_align copied here for easier access + int dshow_block_align; ///< block align variable used to emulate bugs in the MS dshow demuxer } AVIStream; typedef struct { @@ -93,8 +93,8 @@ static void print_tag(const char *str, unsigned int tag, int size) static inline int get_duration(AVIStream *ast, int len){ if(ast->sample_size){ return len; - }else if (ast->block_align){ - return (len + ast->block_align - 1)/ast->block_align; + }else if (ast->dshow_block_align){ + return (len + ast->dshow_block_align - 1)/ast->dshow_block_align; }else return 1; } @@ -572,7 +572,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) break; case AVMEDIA_TYPE_AUDIO: ff_get_wav_header(pb, st->codec, size); - ast->block_align= st->codec->block_align; + ast->dshow_block_align= st->codec->block_align; if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){ av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align); ast->sample_size= st->codec->block_align; |