ffmpeg-7.0.2-chromium_method-1.patch.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Submitted By: Marty Jack (martyj19 at comcast dot net)
  2. Date: 2022-07-23
  3. Initial Package Version: 5.1.0
  4. Origin: Rediffed from ffmpeg-5.0.1-api_addition-1.patch
  5. Upstream Status: Not accepted
  6. Description: The ffmpeg upstream is not willing to take this as a
  7. permanent fix and suggests that Chromium should change to keep the
  8. information locally to Chromium. Until that happens it appears
  9. that many distros are carrying this patch as a temporary
  10. expedient to allow building with system ffmpeg.
  11. diff -Naur ffmpeg-5.1.orig/libavformat/avformat.h ffmpeg-5.1/libavformat/avformat.h
  12. --- ffmpeg-5.1.orig/libavformat/avformat.h 2022-07-22 13:58:39.000000000 -0400
  13. +++ ffmpeg-5.1/libavformat/avformat.h 2022-07-22 19:34:07.490051886 -0400
  14. @@ -1128,6 +1128,10 @@
  15. */
  16. int64_t av_stream_get_end_pts(const AVStream *st);
  17. +// Chromium: We use the internal field first_dts vvv
  18. +int64_t av_stream_get_first_dts(const AVStream *st);
  19. +// Chromium: We use the internal field first_dts ^^^
  20. +
  21. #define AV_PROGRAM_RUNNING 1
  22. /**
  23. diff -Naur ffmpeg-5.1.orig/libavformat/demux_utils.c ffmpeg-5.1/libavformat/demux_utils.c
  24. --- ffmpeg-5.1.orig/libavformat/demux_utils.c 2022-07-22 13:58:39.000000000 -0400
  25. +++ ffmpeg-5.1/libavformat/demux_utils.c 2022-07-22 19:36:39.646735587 -0400
  26. @@ -29,6 +29,13 @@
  27. #include "demux.h"
  28. #include "internal.h"
  29. +// Chromium: We use the internal field first_dts vvv
  30. +int64_t av_stream_get_first_dts(const AVStream *st)
  31. +{
  32. + return cffstream(st)->first_dts;
  33. +}
  34. +// Chromium: We use the internal field first_dts ^^^
  35. +
  36. struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
  37. {
  38. return cffstream(st)->parser;