Originally committed as revision 6411 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -94,6 +94,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 94 | 94 |
stream->chunck_samples = wvfmt.nSamplesPerSec * (uint64_t)info.dwScale / (uint64_t)info.dwRate; |
| 95 | 95 |
stream->chunck_size = stream->chunck_samples * wvfmt.nChannels * wvfmt.wBitsPerSample / 8; |
| 96 | 96 |
|
| 97 |
+ st->codec->codec_tag = wvfmt.wFormatTag; |
|
| 97 | 98 |
st->codec->codec_id = wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_sample); |
| 98 | 99 |
} |
| 99 | 100 |
else if (stream->info.fccType == streamtypeVIDEO) |
| ... | ... |
@@ -115,9 +116,10 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 115 | 115 |
st->codec->width = imgfmt.bmiHeader.biWidth; |
| 116 | 116 |
st->codec->height = imgfmt.bmiHeader.biHeight; |
| 117 | 117 |
|
| 118 |
- st->codec->bits_per_sample = stream->info.dwSampleSize * 8; |
|
| 118 |
+ st->codec->bits_per_sample = imgfmt.bmiHeader.biBitCount; |
|
| 119 | 119 |
st->codec->bit_rate = (uint64_t)stream->info.dwSampleSize * (uint64_t)stream->info.dwRate * 8 / (uint64_t)stream->info.dwScale; |
| 120 |
- st->codec->codec_id = codec_get_id(codec_bmp_tags, stream->info.fccHandler); |
|
| 120 |
+ st->codec->codec_tag = imgfmt.bmiHeader.biCompression; |
|
| 121 |
+ st->codec->codec_id = codec_get_id(codec_bmp_tags, imgfmt.bmiHeader.biCompression); |
|
| 121 | 122 |
|
| 122 | 123 |
st->duration = stream->info.dwLength; |
| 123 | 124 |
} |
| ... | ... |
@@ -128,7 +130,6 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) |
| 128 | 128 |
} |
| 129 | 129 |
|
| 130 | 130 |
avs->nb_streams++; |
| 131 |
- st->codec->codec_tag = stream->info.fccHandler; |
|
| 132 | 131 |
|
| 133 | 132 |
st->codec->stream_codec_tag = stream->info.fccHandler; |
| 134 | 133 |
|