]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avisynth.c
cosmetics: Remove trailing whitespace and tabs.
[ffmpeg] / libavformat / avisynth.c
index 80019c17b299bafa0be22e118b39b7be16ac5cf9..1afcdea5e671396d7e3896a3964a4a5d3f40753d 100644 (file)
@@ -2,18 +2,20 @@
  * AVISynth support for ffmpeg system
  * Copyright (c) 2006 DivX, Inc.
  *
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -94,6 +96,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 +118,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 +132,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;