]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avisynth.c
matroskaenc: Implement support for ALAC
[ffmpeg] / libavformat / avisynth.c
index 4a00787a9c762a38767969dcecadeccea9fc56f2..dcfaa27033e131e04e8e0a867d64e83593c32fad 100644 (file)
@@ -60,7 +60,7 @@ static int avisynth_read_header(AVFormatContext *s)
   res = AVIFileOpen(&avs->file, filename_char, OF_READ|OF_SHARE_DENY_WRITE, NULL);
   if (res != S_OK)
     {
-      av_log(s, AV_LOG_ERROR, "AVIFileOpen failed with error %ld", res);
+      av_log(s, AV_LOG_ERROR, "AVIFileOpen failed with error %ld\n", res);
       AVIFileExit();
       return -1;
     }
@@ -68,7 +68,7 @@ static int avisynth_read_header(AVFormatContext *s)
   res = AVIFileInfo(avs->file, &info, sizeof(info));
   if (res != S_OK)
     {
-      av_log(s, AV_LOG_ERROR, "AVIFileInfo failed with error %ld", res);
+      av_log(s, AV_LOG_ERROR, "AVIFileInfo failed with error %ld\n", res);
       AVIFileExit();
       return -1;
     }
@@ -120,8 +120,11 @@ static int avisynth_read_header(AVFormatContext *s)
                   st = avformat_new_stream(s, NULL);
                   st->id = id;
                   st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-                  st->r_frame_rate.num = stream->info.dwRate;
-                  st->r_frame_rate.den = stream->info.dwScale;
+                  st->avg_frame_rate.num = stream->info.dwRate;
+                  st->avg_frame_rate.den = stream->info.dwScale;
+#if FF_API_R_FRAME_RATE
+                  st->r_frame_rate = st->avg_frame_rate;
+#endif
 
                   st->codec->width = imgfmt.bmiHeader.biWidth;
                   st->codec->height = imgfmt.bmiHeader.biHeight;