]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avisynth.c
bink: set audio stream codec_tag such that binkaudio decoder can identify bitstream...
[ffmpeg] / libavformat / avisynth.c
index 158cac1fcdc056fd6aff6a7a78ba30c5b747ba61..768459a38dacb0cf021c82aec532c83b41ec2b50 100644 (file)
@@ -85,19 +85,19 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     continue;
 
                   st = av_new_stream(s, id);
-                  st->codec->codec_type = CODEC_TYPE_AUDIO;
+                  st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
 
                   st->codec->block_align = wvfmt.nBlockAlign;
                   st->codec->channels = wvfmt.nChannels;
                   st->codec->sample_rate = wvfmt.nSamplesPerSec;
                   st->codec->bit_rate = wvfmt.nAvgBytesPerSec * 8;
-                  st->codec->bits_per_sample = wvfmt.wBitsPerSample;
+                  st->codec->bits_per_coded_sample = wvfmt.wBitsPerSample;
 
                   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);
+                  st->codec->codec_id = ff_wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_coded_sample);
                 }
               else if (stream->info.fccType == streamtypeVIDEO)
                 {
@@ -111,17 +111,17 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     continue;
 
                   st = av_new_stream(s, id);
-                  st->codec->codec_type = CODEC_TYPE_VIDEO;
+                  st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                   st->r_frame_rate.num = stream->info.dwRate;
                   st->r_frame_rate.den = stream->info.dwScale;
 
                   st->codec->width = imgfmt.bmiHeader.biWidth;
                   st->codec->height = imgfmt.bmiHeader.biHeight;
 
-                  st->codec->bits_per_sample = imgfmt.bmiHeader.biBitCount;
+                  st->codec->bits_per_coded_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_tag = imgfmt.bmiHeader.biCompression;
-                  st->codec->codec_id = codec_get_id(codec_bmp_tags, imgfmt.bmiHeader.biCompression);
+                  st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, imgfmt.bmiHeader.biCompression);
 
                   st->duration = stream->info.dwLength;
                 }
@@ -207,9 +207,9 @@ static int avisynth_read_seek(AVFormatContext *s, int stream_index, int64_t pts,
   return 0;
 }
 
-AVInputFormat avisynth_demuxer = {
+AVInputFormat ff_avisynth_demuxer = {
   "avs",
-  "AVISynth",
+  NULL_IF_CONFIG_SMALL("AVISynth"),
   sizeof(AVISynthContext),
   NULL,
   avisynth_read_header,