summaryrefslogtreecommitdiff
path: root/libavformat/avisynth.c
diff options
context:
space:
mode:
authorSteve L'Homme <slhomme@divxcorp.com>2006-10-01 20:41:02 +0000
committerGuillaume Poirier <gpoirier@mplayerhq.hu>2006-10-01 20:41:02 +0000
commite0769997cb753d8a3c9039b1de1542987cfc0692 (patch)
treee99a82bd61a0758506998956c1e0f54802e9019f /libavformat/avisynth.c
parenteacad59e0390f3e087ccda2582031574db3461a7 (diff)
downloadffmpeg-e0769997cb753d8a3c9039b1de1542987cfc0692.tar.gz
add support for some MS DIB formats for avisynth
Patch by Steve Lhomme % slhomme AH divxcorp P com % Original thread: Date: Sep 27, 2006 7:20 PM Subject: [Ffmpeg-devel] [PATCH] AVISynth support for some MS DIB formats Originally committed as revision 6411 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avisynth.c')
-rw-r--r--libavformat/avisynth.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index 80019c17b2..422f775ed7 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -94,6 +94,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
stream->chunck_samples = wvfmt.nSamplesPerSec * (uint64_t)info.dwScale / (uint64_t)info.dwRate;
stream->chunck_size = stream->chunck_samples * wvfmt.nChannels * wvfmt.wBitsPerSample / 8;
+ st->codec->codec_tag = wvfmt.wFormatTag;
st->codec->codec_id = wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_sample);
}
else if (stream->info.fccType == streamtypeVIDEO)
@@ -115,9 +116,10 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->width = imgfmt.bmiHeader.biWidth;
st->codec->height = imgfmt.bmiHeader.biHeight;
- st->codec->bits_per_sample = stream->info.dwSampleSize * 8;
+ st->codec->bits_per_sample = imgfmt.bmiHeader.biBitCount;
st->codec->bit_rate = (uint64_t)stream->info.dwSampleSize * (uint64_t)stream->info.dwRate * 8 / (uint64_t)stream->info.dwScale;
- st->codec->codec_id = codec_get_id(codec_bmp_tags, stream->info.fccHandler);
+ st->codec->codec_tag = imgfmt.bmiHeader.biCompression;
+ st->codec->codec_id = codec_get_id(codec_bmp_tags, imgfmt.bmiHeader.biCompression);
st->duration = stream->info.dwLength;
}
@@ -128,7 +130,6 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
avs->nb_streams++;
- st->codec->codec_tag = stream->info.fccHandler;
st->codec->stream_codec_tag = stream->info.fccHandler;