0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. diff --git a/libavformat/avformat.h b/libavformat/avformat.h
  2. index cd7b0d941c..b4a6dce885 100644
  3. --- a/libavformat/avformat.h
  4. +++ b/libavformat/avformat.h
  5. @@ -1169,7 +1169,11 @@ typedef struct AVStreamGroup {
  6. } AVStreamGroup;
  7. struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
  8. +// Chromium: We use the internal field first_dts vvv
  9. +int64_t av_stream_get_first_dts(const AVStream *st);
  10. +// Chromium: We use the internal field first_dts ^^^
  11. +
  12. #define AV_PROGRAM_RUNNING 1
  13. /**
  14. diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c
  15. index de7580c32d..0ef0fe530e 100644
  16. --- a/libavformat/mux_utils.c
  17. +++ b/libavformat/mux_utils.c
  18. @@ -29,7 +29,14 @@ #include "avformat.h"
  19. #include "avio.h"
  20. #include "internal.h"
  21. #include "mux.h"
  22. +// Chromium: We use the internal field first_dts vvv
  23. +int64_t av_stream_get_first_dts(const AVStream *st)
  24. +{
  25. + return cffstream(st)->first_dts;
  26. +}
  27. +// Chromium: We use the internal field first_dts ^^^
  28. +
  29. int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
  30. int std_compliance)
  31. {