[mythtv-commits] [MythTV/mythtv] 445efb: avformatdecoder: stylistic change to switch-case t...

Scott Theisen noreply at github.com
Mon Jun 13 13:14:10 UTC 2022


  Branch: refs/heads/devel/ffmpeg-resync
  Home:   https://github.com/MythTV/mythtv
  Commit: 445efb235dbc790a1e0ed7843392d07265de7d10
      https://github.com/MythTV/mythtv/commit/445efb235dbc790a1e0ed7843392d07265de7d10
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  avformatdecoder: stylistic change to switch-case to default return


  Commit: da498f9f0508e29e43e5058d2b60b674bb4cafbb
      https://github.com/MythTV/mythtv/commit/da498f9f0508e29e43e5058d2b60b674bb4cafbb
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/avcodec.h
    M mythtv/external/FFmpeg/libavcodec/libavcodec.v
    M mythtv/external/FFmpeg/libavcodec/utils-mythtv.c
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  remove FFmpeg addition ff_codec_type_string()

replace with av_get_media_type_string in ffmpeg and copy to only
user as AVMediaTypeToString: libs/libmythtv/decoders/avformatdecoder.cpp


  Commit: 1c346ec1acc794cb6d324e7404365741f7886fc8
      https://github.com/MythTV/mythtv/commit/1c346ec1acc794cb6d324e7404365741f7886fc8
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/codec_desc.c

  Log Message:
  -----------
  add MPEG2VBI and DVB_VBI to codec_desc.c

This enables removing libavcodec/utils-mythtv.c


  Commit: 64a3c60ee5acc779dcc25c4ab15547be2281f54e
      https://github.com/MythTV/mythtv/commit/64a3c60ee5acc779dcc25c4ab15547be2281f54e
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    M mythtv/libs/libmyth/audio/audiooutputbase.cpp
    M mythtv/libs/libmyth/audio/audiooutputdigitalencoder.cpp
    M mythtv/libs/libmyth/audio/spdifencoder.cpp
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
    M mythtv/libs/libmythtv/decoders/avformatdecoder.h
    M mythtv/libs/libmythtv/decoders/mythcodeccontext.cpp
    M mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp
    M mythtv/libs/libmythtv/decoders/mythvaapicontext.cpp
    M mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp
    M mythtv/libs/libmythtv/decoders/mythvtbcontext.cpp
    M mythtv/libs/libmythtv/mythplayerui.cpp
    M mythtv/libs/libmythtv/recorders/recorderbase.cpp
    M mythtv/libs/libmythtv/recordingfile.h

  Log Message:
  -----------
  replace ff_codec_id_string() with avcodec_get_name()

This enables removing libavcodec/utils-mythtv.c

The returned string is now lower case, instead of all capital letters; however, I don't anticipate that being an issue.


  Commit: d1cd1937c20d9a80dc91e2edfe1028e42ae76f9b
      https://github.com/MythTV/mythtv/commit/d1cd1937c20d9a80dc91e2edfe1028e42ae76f9b
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/Makefile
    M mythtv/external/FFmpeg/libavcodec/avcodec.h
    M mythtv/external/FFmpeg/libavcodec/libavcodec.v
    R mythtv/external/FFmpeg/libavcodec/utils-mythtv.c

  Log Message:
  -----------
  remove (now unused) FFmpeg/libavcodec/utils-mythtv.c


  Commit: 4a6144c8c59a4415e4272b870a52ed97fdccc2ff
      https://github.com/MythTV/mythtv/commit/4a6144c8c59a4415e4272b870a52ed97fdccc2ff
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/codec_desc.c

  Log Message:
  -----------
  ffmpeg codec_desc.c: remove duplicate dvd nav packet


  Commit: eb140fb2dff93205b6e9edf16ff084b41f1a2c1c
      https://github.com/MythTV/mythtv/commit/eb140fb2dff93205b6e9edf16ff084b41f1a2c1c
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/io/mythavformatbuffer.cpp

  Log Message:
  -----------
  mythavformatbuffer.cpp: remove unused include


  Commit: 02a7a57d5c78dfd56ae41e899fdf692d2907e955
      https://github.com/MythTV/mythtv/commit/02a7a57d5c78dfd56ae41e899fdf692d2907e955
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/mpeg/H2645Parser.cpp

  Log Message:
  -----------
  H2645Parser.cpp: remove unnecessary float -> double casts


  Commit: 632b0b3df21b106388ea5ed932bb069e71cabc28
      https://github.com/MythTV/mythtv/commit/632b0b3df21b106388ea5ed932bb069e71cabc28
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  remove vestiges of ffmpeg addition build_index

The change to ffmpeg does nothing and is being removed to reduce MythTV's
downstream changes to FFmpeg, hopefully culminating in an unmodified FFmpeg.

avformatdecoder.cpp probably needs more cleanup, but this is the minimal change
required to enable the removal of build_index from FFmpeg.


  Commit: f8c8b89a6d5baac49ce57ac6ac73241f6513a6cd
      https://github.com/MythTV/mythtv/commit/f8c8b89a6d5baac49ce57ac6ac73241f6513a6cd
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  replace deprecated for decoding AVCodecContex::time_base

decprecated since 2014 https://github.com/FFmpeg/FFmpeg/commit/7ea1b3472a61de4aa4d41b571e99418e4997ad41


  Commit: 5613ba4a12662726367455cb10469615be7666a6
      https://github.com/MythTV/mythtv/commit/5613ba4a12662726367455cb10469615be7666a6
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  AvFormatDecoder::GetVideoFrameRate initial refactor


  Commit: bd1a45f041abcb79b74d36d320476d3c65d74d99
      https://github.com/MythTV/mythtv/commit/bd1a45f041abcb79b74d36d320476d3c65d74d99
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  AvFormatDecoder::GetVideoFrameRate use std::set

working toward not converting framerates to doubles


  Commit: 2b9937766ecef1bec0c930c4533a3ce25e5567f2
      https://github.com/MythTV/mythtv/commit/2b9937766ecef1bec0c930c4533a3ce25e5567f2
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  avformatdecoder.cpp: fixup headers

replace unused internal header "libavformat/isom.h" with the used
non-internal header "libavutil/stereo3d.h"


  Commit: d24b9d755f14078b5d11c51e0d0696a03ca6352a
      https://github.com/MythTV/mythtv/commit/d24b9d755f14078b5d11c51e0d0696a03ca6352a
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  avformatdecoder.cpp: remove '#include "libavformat/internal.h"'

refs: https://github.com/MythTV/mythtv/issues/428

ff_read_frame_flush() is an internal FFmpeg function.

However, in libavformat/utils.c:
int avformat_flush(AVFormatContext *s)
{
    ff_read_frame_flush(s);
    return 0;
}

avformat_flush() is exactly identical and is a public function,
so use it instead.

StreamHasRequiredParameters():
The audio check requiring the internal struct to be defined was disabled.
This should have no effect since these checks are *all* already done via
avformat_find_stream_info() in FindStreamInfo(), which should return < 0
if these checks fail.

This copy of an internal FFmpeg function feels unnecessary and like a bad idea
since FFmpeg already checks this itself.


  Commit: 9cc4ac55eb67d64d0095e15572ef8d61edcb0cd8
      https://github.com/MythTV/mythtv/commit/9cc4ac55eb67d64d0095e15572ef8d61edcb0cd8
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  avformatdecoder.cpp: remove duplicate checks

FFmpeg already checks these in avformat_find_stream_info()
(called via FindStreamInfo() just prior).  FFmpeg should return
<0 if these checks fail, which causes the function to return
before the removed lines are executed.

These checks are copied from libavformat/utils.c and use internal
FFmpeg information (if those checks were enabled).  This is bad
pratice.  Since FFmpeg already checks these, remove our copies.


  Commit: e405bf8a5aac72fffec9544e7aaf2efe21eab314
      https://github.com/MythTV/mythtv/commit/e405bf8a5aac72fffec9544e7aaf2efe21eab314
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythmetadata/metaiomp4.cpp
    M mythtv/libs/libmythmetadata/metaiomp4.h
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  av_estimate_timings(): remove use of MythTV customization to FFmpeg

This calls the supposed to be static estimate_timings(); however
avformat_find_stream_info(), which is called prior to all
calls of av_estimate_timings(), already calls estimate_timings()
since AVFormatContext.probesize defaults to 5 000 000 bytes.

Thus, these calls are redundant duplicates of the call in
avformat_find_stream_info().

This was removed from avformatdecoder.cpp in 3924df87c7691852741b596f50311eac46f930ab
and added back in ebf194444c30eb6c7d1d6d272045674fc45a2e65 .

I'm not sure why it was added back.  If it is necessary, calling
avformat_find_stream_info() again with possibly a larger
probesize or max_analyze_duration, should work as a replacement.


  Commit: 7e646371bbfef024c84fce7a8934c9c439d534d0
      https://github.com/MythTV/mythtv/commit/7e646371bbfef024c84fce7a8934c9c439d534d0
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/mythavutil.h

  Log Message:
  -----------
  mythavutil.h: create MythAVBufferRef


  Commit: 3264272f70246152332d40b8a727d3b36504b5a1
      https://github.com/MythTV/mythtv/commit/3264272f70246152332d40b8a727d3b36504b5a1
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    A mythtv/libs/libmythtv/bytereader.cpp
    A mythtv/libs/libmythtv/bytereader.h
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
    M mythtv/libs/libmythtv/libmythtv.pro
    M mythtv/libs/libmythtv/mpeg/AVCParser.cpp
    M mythtv/libs/libmythtv/mpeg/HEVCParser.cpp
    M mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
    M mythtv/programs/mythutil/mpegutils.cpp

  Log Message:
  -----------
  create ByteReader to eliminate use of FFmpeg modification

by copying avpriv_find_start_code() into MythTV as ByteReader::find_start_code().

Refs: https://github.com/MythTV/mythtv/issues/428

Note: I have rewritten this function.  The only functional change is
00 00 01 00 01 XX no longer incorrectly returns a start code at
offset 7 that overlaps the start code at offset 4 if the start_code
input is not modified between the two calls.

FFmpeg only has one use that keeps the history,
(ff_)mpeg1_find_frame_end().

So, I have split the truncated start code logic into its own function
as I have now done for FFmpeg, which only used this functionality once.

Determining if it is necessary would require further analysis or
adding logging to see if truncated start codes are detected.


  Commit: e61b5d5a6b372dedee728286d63e5745e23d69c9
      https://github.com/MythTV/mythtv/commit/e61b5d5a6b372dedee728286d63e5745e23d69c9
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/avcodec.h

  Log Message:
  -----------
  lavc/avcodec.h: remove no longer used MythTV function export


  Commit: 52c27a0bb0b56cb1de841912d3ff326bedc80720
      https://github.com/MythTV/mythtv/commit/52c27a0bb0b56cb1de841912d3ff326bedc80720
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/mpeg/H2645Parser.h

  Log Message:
  -----------
  H2645Parser.h: remove unused defines


  Commit: 49814fff4ed27f3a91056f75c0ba9f9d9d614dd6
      https://github.com/MythTV/mythtv/commit/49814fff4ed27f3a91056f75c0ba9f9d9d614dd6
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    A mythtv/libs/libmythtv/bitreader.h
    M mythtv/libs/libmythtv/libmythtv.pro
    A mythtv/libs/libmythtv/test/test_bitreader/.gitignore
    A mythtv/libs/libmythtv/test/test_bitreader/test_bitreader.cpp
    A mythtv/libs/libmythtv/test/test_bitreader/test_bitreader.h
    A mythtv/libs/libmythtv/test/test_bitreader/test_bitreader.pro

  Log Message:
  -----------
  create class BitReader to replace internal ffmpeg headers

All inline because that is how FFmpeg's is.

The unit tests are not the most extensive but are sufficient to
convince me that it works properly.


  Commit: 168b1ec6ee7f9bbd369fbd51191b459dda95d0d7
      https://github.com/MythTV/mythtv/commit/168b1ec6ee7f9bbd369fbd51191b459dda95d0d7
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp
    M mythtv/libs/libmythtv/mpeg/AVCParser.cpp
    M mythtv/libs/libmythtv/mpeg/AVCParser.h
    M mythtv/libs/libmythtv/mpeg/H2645Parser.cpp
    M mythtv/libs/libmythtv/mpeg/H2645Parser.h
    M mythtv/libs/libmythtv/mpeg/HEVCParser.cpp
    M mythtv/libs/libmythtv/mpeg/HEVCParser.h

  Log Message:
  -----------
  replace internal ffmpeg headers with BitReader

This should have no functional change.

References https://github.com/MythTV/mythtv/issues/428

The hack is no longer necessary since internal FFmpeg headers are no longer
included by the parsers.

avformatdecoder.cpp needed the non-internal FFmpeg header "libavutil/intreadwrite.h".


  Commit: f8836c1a11f41f3de876ba17fc82550d23b3123e
      https://github.com/MythTV/mythtv/commit/f8836c1a11f41f3de876ba17fc82550d23b3123e
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/get_bits.h
    M mythtv/external/FFmpeg/libavcodec/golomb.h

  Log Message:
  -----------
  lavc/get_bits.h and golomb.h: revert MythTV changes

The changes were to defeat compiler warnings, but MythTV no longer includes
these internal headers.


  Commit: 9af1570bce817955a6a6a3aaab9ee0975d4972f8
      https://github.com/MythTV/mythtv/commit/9af1570bce817955a6a6a3aaab9ee0975d4972f8
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  lavf/utils.c: remove unused extern declarations


  Commit: c2bdf57b5d4afa5584e390cae8f5271d3f019a76
      https://github.com/MythTV/mythtv/commit/c2bdf57b5d4afa5584e390cae8f5271d3f019a76
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/avformat.h
    M mythtv/external/FFmpeg/libavformat/utils-mythtv.c

  Log Message:
  -----------
  lavf: move MythTV added define to the only file using it

this quiets a warning about it being redefined elsewhere in ffmpeg


  Commit: 7276cd47aa3f0e9f1930bc0f00657af23b18f6d8
      https://github.com/MythTV/mythtv/commit/7276cd47aa3f0e9f1930bc0f00657af23b18f6d8
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libpostproc/postprocess.c

  Log Message:
  -----------
  lpp: revert unnecessary added include

seems to have been added during an ffmpeg merge, but is unused


  Commit: 649aa1eba55b10715b87f998b0d6b6cade4f85bf
      https://github.com/MythTV/mythtv/commit/649aa1eba55b10715b87f998b0d6b6cade4f85bf
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libpostproc/postprocess.c

  Log Message:
  -----------
  lpp: revert unnecessary MythTV cpu autodetect

This is from 2010-08-24:
detect available SIMD extensions when runtime-cpudetect is enabled
https://github.com/MythTV/mythtv/commit/206974153a539acd72451512ac6a7aae818d0fe9

but if you look at the following lines, ffmpeg has effectively the same since 2012-11-18:
pp: add auto detection cpu flag.
https://github.com/FFmpeg/FFmpeg/commit/59d686f100863d00b8f171dd891e893c2bfd951e


  Commit: ed56ddaac59d69bb611c7fc0b494fe277c9c586d
      https://github.com/MythTV/mythtv/commit/ed56ddaac59d69bb611c7fc0b494fe277c9c586d
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libpostproc/Makefile

  Log Message:
  -----------
  lpp: revert change to Makefile

if ffmpeg doesn't need this, neither do we


  Commit: ad41512faaa6e9886a4fa739a405941d818c630e
      https://github.com/MythTV/mythtv/commit/ad41512faaa6e9886a4fa739a405941d818c630e
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/dvbsubdec.c

  Log Message:
  -----------
  lavc/dvbsubdec.c: remove redundant conditional statements

from: https://github.com/MythTV/mythtv/commit/68ca96cfa02b9df406de4ad233fdb395405f6b88

duplicates the condition on line 919, which will catch it and return


  Commit: 33a8f406869ccf1c415c854c02eed500408f05e6
      https://github.com/MythTV/mythtv/commit/33a8f406869ccf1c415c854c02eed500408f05e6
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/mpegvideo.h

  Log Message:
  -----------
  lavc/mpegvideo.h: revert unnecessary changes

class: C++ keyword, but MythTV does not include this file

removed parentheses resulted from a complier warning about
"unnecessary parentheses"


  Commit: e4821bed24b3e367499ad4962dae516676927861
      https://github.com/MythTV/mythtv/commit/e4821bed24b3e367499ad4962dae516676927861
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h

  Log Message:
  -----------
  Initial mpegts-mythtv.h harmonization

Note: most of the defines aren't actually used


  Commit: 706ec001b8d016a33ee639f3ba8bbbafb7315b4c
      https://github.com/MythTV/mythtv/commit/706ec001b8d016a33ee639f3ba8bbbafb7315b4c
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mov.c

  Log Message:
  -----------
  Revert "libavformat/mov.c: increase allowed time error"

This reverts commit 346d4dbbf0babc5b5bc4743afd26ee997667ea7c.

from:
changed: allow 4 second skew between streams in mov before attempting to seek https://github.com/MythTV/mythtv/commit/e4170c604e6a6af969e5de74ac740ac596686da8

No reason given for the change.


  Commit: 29c6e92ddabe28bc4afca1d8ecc4ab26e31c1973
      https://github.com/MythTV/mythtv/commit/29c6e92ddabe28bc4afca1d8ecc4ab26e31c1973
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/mpeg4videodec.c

  Log Message:
  -----------
  Revert "libavcodec/mpeg4videodec.c"

This reverts commit 9632275126d4e6a698569c9d4316a300fe98d18f.

I agree with stuartm’s decade old comment on MythTV ticket 3001: H.263 is not a commonly used codec and if these are still bugs, they should be (re-)opened upstream with FFmpeg.

For frame rate “fix” see: October 2005
Closes #509, by applying patch. https://github.com/MythTV/mythtv/commit/f851316ffc438d3570ee47ab87d4ad961d36bb4e

however, it has been wrong since October 2014:
Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41'
https://github.com/FFmpeg/FFmpeg/commit/17085a0251a1493f6447aa3d2ee06fda2c9402f0

lavc: deprecate the use of AVCodecContext.time_base for decoding
https://github.com/FFmpeg/FFmpeg/commit/7ea1b3472a61de4aa4d41b571e99418e4997ad41

-----
for not compiled section see:
Revert [25805], the fix for our workaround created playback problems https://github.com/MythTV/mythtv/commit/eaa8f0dd129ee1bc6b7be2ba76fb98460bf57ec3

nuv: fix mpeg4 decoding issue in #3001 properly https://github.com/MythTV/mythtv/commit/8082c91bba961af747ecc81a029c6d7bd7eadc4a

MPEG-4 decode errors as of [12645] https://code.mythtv.org/trac/ticket/3001

Trunk unable to playback MPEG4 files created by mythtranscode https://code.mythtv.org/trac/ticket/8927


  Commit: 539cf243c2026a532de2795a5156ee5041751d37
      https://github.com/MythTV/mythtv/commit/539cf243c2026a532de2795a5156ee5041751d37
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/mpegaudiodec_template.c

  Log Message:
  -----------
  Revert "MythTV: suppress errors from old .nuv files"

This reverts commit 6c8c3809732f9400293b0a5a82bf5f5db71d82c2.

from 2007-05-28: https://github.com/MythTV/mythtv/commit/ef017db37b842417d1a47131df34fbe4e1defd2b
references: https://code.mythtv.org/trac/ticket/2972


  Commit: 58d6aad281fc378f38b2ee8713acf96f7857964e
      https://github.com/MythTV/mythtv/commit/58d6aad281fc378f38b2ee8713acf96f7857964e
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  silence mpegts-mythtv.c warning: mpegts_probe -Wincompatible-pointer-types


  Commit: 9b734965dd67d11742fc94ce8283bc38978dd632
      https://github.com/MythTV/mythtv/commit/9b734965dd67d11742fc94ce8283bc38978dd632
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  fixup PMT patch lavf/utils.c


  Commit: a85004ff214a4e66d0b319d24a08c3512f2ea494
      https://github.com/MythTV/mythtv/commit/a85004ff214a4e66d0b319d24a08c3512f2ea494
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  revert unnecessary null check in lavf/utils.c

st->codec is deprecated and appears to be unused in the guarded code

st should be non-null based on the for loop condition


  Commit: 04aeed59765b34cc2c16ee327b53719270767830
      https://github.com/MythTV/mythtv/commit/04aeed59765b34cc2c16ee327b53719270767830
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  Revert "lavf/utils.c: don't compile some debug log messages"

This reverts commit 1d3e96d200a035334eab79de0f4880453adf219e.

See https://trac.ffmpeg.org/ticket/1344
If this is still an issue, the FFmpeg ticket should be reopened with a sample.


  Commit: 024ab27e2b943791320c0d51cccf1b925ad50c54
      https://github.com/MythTV/mythtv/commit/024ab27e2b943791320c0d51cccf1b925ad50c54
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/dvbsubdec.c

  Log Message:
  -----------
  fixup dvbsubdec.c: remove unused variables


  Commit: 6aca122f25663031259fa1ed81f6c96720b80ae3
      https://github.com/MythTV/mythtv/commit/6aca122f25663031259fa1ed81f6c96720b80ae3
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/avformat.h
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  fixup lavf MHEG changes: remove unused got_frame


  Commit: 1199f83ccdf84faf7ca08beab79a7b97fd324b6c
      https://github.com/MythTV/mythtv/commit/1199f83ccdf84faf7ca08beab79a7b97fd324b6c
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/avformat.h
    M mythtv/external/FFmpeg/libavformat/libavformat.v
    M mythtv/external/FFmpeg/libavformat/utils-mythtv.c
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  fixup lavf/utils-mythtv.c: remove unused code, don't expose unused symbols


  Commit: be1066c55b93a73a6605a617800c03120a3cf3c1
      https://github.com/MythTV/mythtv/commit/be1066c55b93a73a6605a617800c03120a3cf3c1
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpeg.c

  Log Message:
  -----------
  ffmpeg lavf/mpeg.c: fix indentation


  Commit: e8f0a551f1d38531529b43115b16df7eae09a77e
      https://github.com/MythTV/mythtv/commit/e8f0a551f1d38531529b43115b16df7eae09a77e
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/dvbsubdec.c

  Log Message:
  -----------
  revert MythTV 'DVB Subtitles: Fix display of subs with no display segment.'

from https://github.com/MythTV/mythtv/commit/d27bedf5571bdb80c164ce5d11a8af55f0275b92

Fixed 6 months later in FFmpeg (a decade ago):
Fix dvb subtitle decoding when display segment is missing.
https://github.com/FFmpeg/FFmpeg/commit/7df9937fcc6a91ce4763dfa1ea6fc331f7e77295


  Commit: 5809a6601d3402129f88dc486a61621b4ccbb954
      https://github.com/MythTV/mythtv/commit/5809a6601d3402129f88dc486a61621b4ccbb954
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/avformat.h
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  lavf: remove unused MythTV addition build_index

originally from https://github.com/MythTV/mythtv/commit/3539d581feeb0cbb9d6b7a3a077b27b9ec7693b9

also fixup comment spacing


  Commit: 90594dd7e8f83e1ed91defa1fcb647be39b423d8
      https://github.com/MythTV/mythtv/commit/90594dd7e8f83e1ed91defa1fcb647be39b423d8
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/dvbsubdec.c
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    M mythtv/external/FFmpeg/libavformat/utils.c
    M mythtv/external/FFmpeg/libavutil/frame.h

  Log Message:
  -----------
  ffmpeg: trim trailing whitespace


  Commit: fe732c2fd0e3945de34722c1272b4d704cea0665
      https://github.com/MythTV/mythtv/commit/fe732c2fd0e3945de34722c1272b4d704cea0665
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/internal.h

  Log Message:
  -----------
  Revert "libavcodec/internal.h: fix compilation with MSVC"

This reverts commit 066a0866f3cccbde7b65cda0a4b24b3c95ebf3be.


  Commit: 1fd4faf9a741c9e0148d353caee756c81dd16cde
      https://github.com/MythTV/mythtv/commit/1fd4faf9a741c9e0148d353caee756c81dd16cde
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/isom.h

  Log Message:
  -----------
  revert 'MythTV: class is a reserved keyword in C++'

This change has been unnecessary since 3d21dadbc797298df112aa0838125c7b3ab384f9.


  Commit: 89161f077ed893f992292bade2de9f711b149886
      https://github.com/MythTV/mythtv/commit/89161f077ed893f992292bade2de9f711b149886
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/mpegaudio_parser.c

  Log Message:
  -----------
  lavc/mpegaudio_parser.c: revert MythTV workaround

originally from https://github.com/MythTV/mythtv/commit/0bc16040176a1caf61068f42272b63698751d7dc
referencing https://code.mythtv.org/trac/ticket/8260

References https://github.com/MythTV/mythtv/issues/428

If this causes an issue, a new ticket with logs and a sample should be openned.


  Commit: fc12adf0150ed89b165f2b69e02d1ac1347acbc4
      https://github.com/MythTV/mythtv/commit/fc12adf0150ed89b165f2b69e02d1ac1347acbc4
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h
    M mythtv/external/FFmpeg/libavformat/utils-mythtv.c

  Log Message:
  -----------
  mpegts-mythtv.h: don't expose mpegts_remove_stream()

working toward merging utils-mythtv.c back into utils.c


  Commit: d70a5312a69c209b38396bdfd00cf4287c22d47a
      https://github.com/MythTV/mythtv/commit/d70a5312a69c209b38396bdfd00cf4287c22d47a
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/Makefile
    R mythtv/external/FFmpeg/libavformat/utils-mythtv.c
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  lavf: merge utils-mythtv.c back into utils.c


  Commit: a4aecdb3b972b065d951f30fb7ee87241e14999c
      https://github.com/MythTV/mythtv/commit/a4aecdb3b972b065d951f30fb7ee87241e14999c
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/avformat.h
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  lavf: export flush_packet_queue() as mythtv_flush_packet_queue()

FFmpeg 5.0 renames and exports this as ff_flush_packet_queue().

This change is intended to make transitioning to FFmpeg 5.0 easier.

Technically, this should be in libavformat/internal.h, but, since it is currently
unmodified, libavformat/avformat.h will work for now.  (MythTV does not directly use
this function.)


  Commit: fc7151861554ede36ed3517037fb2c74dafd6b5a
      https://github.com/MythTV/mythtv/commit/fc7151861554ede36ed3517037fb2c74dafd6b5a
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  lavf/utils.c: silence -Wdeclaration-after-statement


  Commit: d0dc8183044003a391ac4019ff5f575b80c1444b
      https://github.com/MythTV/mythtv/commit/d0dc8183044003a391ac4019ff5f575b80c1444b
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/mpeg12dec.c

  Log Message:
  -----------
  libavcodec/mpeg12dec.c: silence -Wunused-variable from MythTV modification


  Commit: 54ff5c1b346cd459a9df765a30251f53b7a903ff
      https://github.com/MythTV/mythtv/commit/54ff5c1b346cd459a9df765a30251f53b7a903ff
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  lavf/mpegts-mythtv.c: silence -Wdeclaration-after-statement


  Commit: 7e8ce4fd2901d2004ad46591b49c8c94b9bc9a52
      https://github.com/MythTV/mythtv/commit/7e8ce4fd2901d2004ad46591b49c8c94b9bc9a52
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  libavformat/mpegts-mythtv.c: silence -Wformat

st is a pointer not an unsigned int.


  Commit: 95478bb1a037c346fd069a74fe8b8d767df3efa0
      https://github.com/MythTV/mythtv/commit/95478bb1a037c346fd069a74fe8b8d767df3efa0
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  libavformat/mpegts-mythtv.c: silence -Wunused-variable


  Commit: a6f7598cc0983d03bf0188ea89f80799b12752bd
      https://github.com/MythTV/mythtv/commit/a6f7598cc0983d03bf0188ea89f80799b12752bd
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  libavformat/mpegts-mythtv.c: silence -Wundef


  Commit: f07b4395cf373e7dfb3d92b73ae45d58427a3a5c
      https://github.com/MythTV/mythtv/commit/f07b4395cf373e7dfb3d92b73ae45d58427a3a5c
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  libavformat/mpegts-mythtv.c: silence -Wunused-function


  Commit: 5f7057394523e38435cca1e2ba3c22d97938a4cd
      https://github.com/MythTV/mythtv/commit/5f7057394523e38435cca1e2ba3c22d97938a4cd
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  libavformat/mpegts-mythtv.c: silence -Wdiscarded-qualifiers

The warning was:

libavformat/mpegts-mythtv.c: In function ‘pmt_cb’:
libavformat/mpegts-mythtv.c:1971:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1971 |         tmp0 = avctx->cur_pmt_sect;
      |              ^


  Commit: 1d838b84d40be8ec3279a052711272907e5bf8ed
      https://github.com/MythTV/mythtv/commit/1d838b84d40be8ec3279a052711272907e5bf8ed
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

  Log Message:
  -----------
  libavformat/mpegts-mythtv.c: move MythTV only stuff first

This is intended to make copying over the current FFmpeg mpegts.c produce a better diff.

No functional change.


  Commit: 03716b41ef7d77b189e774a985f36dce73a03bb4
      https://github.com/MythTV/mythtv/commit/03716b41ef7d77b189e774a985f36dce73a03bb4
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavcodec/libavcodec.v
    M mythtv/external/FFmpeg/libavformat/libavformat.v

  Log Message:
  -----------
  FFmpeg: remove now unecessary added exports


  Commit: f19cdb7486b4d40c3bb886a9e6393b5a1435ad85
      https://github.com/MythTV/mythtv/commit/f19cdb7486b4d40c3bb886a9e6393b5a1435ad85
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  libavformat/utils.c: av_remove_stream() #if 0 the entire if else ladder

This was from https://github.com/MythTV/mythtv/commit/9cb02dee588127240fb8a843ed92347a33c7e0e1

when it was still part of utils.c.


  Commit: e58a539d4c162ee7aebf64b8e3296419debc66c8
      https://github.com/MythTV/mythtv/commit/e58a539d4c162ee7aebf64b8e3296419debc66c8
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/utils.c

  Log Message:
  -----------
  libavformat/utils.c: silence final MythTV warning

No functional change, but AVStream.codec was removed in FFmpeg 5.0.

This should enable it to compile with FFmpeg 5.0, since it will then be
not compiled.


  Commit: 5e2fa1a249209af5d3d46fdc811086b4a08054d3
      https://github.com/MythTV/mythtv/commit/5e2fa1a249209af5d3d46fdc811086b4a08054d3
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/os_support.h

  Log Message:
  -----------
  lavf/os_support.h: remove MythTV customization

that silenced a compiler warning, but this file is no longer included
by MythTV, so the change is no longer necessary.


  Commit: 3643c1f5685614acdb1663bf56d31c1b685e3671
      https://github.com/MythTV/mythtv/commit/3643c1f5685614acdb1663bf56d31c1b685e3671
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h

  Log Message:
  -----------
  mpegts-mythtv.h: harmonize with mpegts.h

Almost a superset.  Different function names and ff_parse_mpeg2_descriptor()
takes an extra parameter.


  Commit: beba76345e977d94994466e5446adb7da673f3c4
      https://github.com/MythTV/mythtv/commit/beba76345e977d94994466e5446adb7da673f3c4
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-06-12 (Sun, 12 Jun 2022)

  Changed paths:
    M mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    M mythtv/libs/libmythtv/decoders/avformatdecoder.cpp

  Log Message:
  -----------
  mpegts-mythtv.c: export disposition from ISO_639_LANGUAGE_DESCRIPTOR

This replaces the use of the MythTV added, exported PMT for detecting
these in AvFormatDecoder::GetAudioTrackType().

disposition is copied over to the AVStream in mpegts_add_stream().

language is only 4 bytes, so don't write past the end.
i.e. the loop is invalid.


Compare: https://github.com/MythTV/mythtv/compare/445efb235dbc%5E...beba76345e97



More information about the mythtv-commits mailing list