transcode-1.1.7-libav-10.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. fix building w/libav-10
  2. https://wiki.libav.org/Migration/10
  3. --- a/filter/filter_resample.c
  4. +++ b/filter/filter_resample.c
  5. @@ -37,6 +37,7 @@
  6. #include "libtc/optstr.h"
  7. #include "libtc/tcavcodec.h"
  8. #include "libtc/tcmodule-plugin.h"
  9. +#include <libavresample/avresample.h>
  10. typedef struct {
  11. @@ -45,7 +46,7 @@ typedef struct {
  12. int bytes_per_sample;
  13. - ReSampleContext *resample_ctx;
  14. + AVAudioResampleContext *resample_ctx;
  15. } ResamplePrivateData;
  16. static const char resample_help[] = ""
  17. --- a/import/probe_ffmpeg.c
  18. +++ b/import/probe_ffmpeg.c
  19. @@ -51,8 +51,8 @@ static void translate_info(const AVFormatContext *ctx, ProbeInfo *info)
  20. info->bitrate = st->codec->bit_rate / 1000;
  21. info->width = st->codec->width;
  22. info->height = st->codec->height;
  23. - if (st->r_frame_rate.num > 0 && st->r_frame_rate.den > 0) {
  24. - info->fps = av_q2d(st->r_frame_rate);
  25. + if (st->avg_frame_rate.num > 0 && st->avg_frame_rate.den > 0) {
  26. + info->fps = av_q2d(st->avg_frame_rate);
  27. } else {
  28. /* watch out here */
  29. info->fps = 1.0/av_q2d(st->codec->time_base);