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

Scott Theisen noreply at github.com
Mon Jul 11 13:47:12 UTC 2022


  Branch: refs/heads/devel/ffmpeg-resync
  Home:   https://github.com/MythTV/mythtv
  Commit: 600227f488057d61a35fc63eb5b2f986f73ada7f
      https://github.com/MythTV/mythtv/commit/600227f488057d61a35fc63eb5b2f986f73ada7f
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 3ef58cc19c628d88f98fe4086b3ad7ef695b4ead
      https://github.com/MythTV/mythtv/commit/3ef58cc19c628d88f98fe4086b3ad7ef695b4ead
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 6ddbbb381ae7bea8ae769dfbc00ee22a38c87a76
      https://github.com/MythTV/mythtv/commit/6ddbbb381ae7bea8ae769dfbc00ee22a38c87a76
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: b5d3fa4a557a7723868f86f930c77975c5f5aa7d
      https://github.com/MythTV/mythtv/commit/b5d3fa4a557a7723868f86f930c77975c5f5aa7d
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 5d0b77732db15094d8aed26745f6b43dfa7f3d3c
      https://github.com/MythTV/mythtv/commit/5d0b77732db15094d8aed26745f6b43dfa7f3d3c
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 98dbc84bb13f3a3c2f3e05fbbac7490e54ee3991
      https://github.com/MythTV/mythtv/commit/98dbc84bb13f3a3c2f3e05fbbac7490e54ee3991
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 1887647a2e1b2b05a7d93f79d37561daa5a55d17
      https://github.com/MythTV/mythtv/commit/1887647a2e1b2b05a7d93f79d37561daa5a55d17
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 307eeb054792a1654103686a8515ffef1e07c8ee
      https://github.com/MythTV/mythtv/commit/307eeb054792a1654103686a8515ffef1e07c8ee
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 8397f64cc11effbe954df34b98544e976954ff7b
      https://github.com/MythTV/mythtv/commit/8397f64cc11effbe954df34b98544e976954ff7b
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 5746ba45a8dcd200527b2320a8670ad1757ed35a
      https://github.com/MythTV/mythtv/commit/5746ba45a8dcd200527b2320a8670ad1757ed35a
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: d2317c4a782d542b5a2bba0daf223d44cd6e6a0a
      https://github.com/MythTV/mythtv/commit/d2317c4a782d542b5a2bba0daf223d44cd6e6a0a
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 9c79262962e1d37ef4ab232784eaee4015932658
      https://github.com/MythTV/mythtv/commit/9c79262962e1d37ef4ab232784eaee4015932658
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 0789f6e9d94f9964487434dd8ba20a1a6282aabd
      https://github.com/MythTV/mythtv/commit/0789f6e9d94f9964487434dd8ba20a1a6282aabd
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 34e82a8f6cc04ac1ee695abc9c696f852a9b7bbc
      https://github.com/MythTV/mythtv/commit/34e82a8f6cc04ac1ee695abc9c696f852a9b7bbc
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 465fd87e3fab0a062943e2a920720c530f592f15
      https://github.com/MythTV/mythtv/commit/465fd87e3fab0a062943e2a920720c530f592f15
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: e3473733710a7767bca61946c0f4424544457cd3
      https://github.com/MythTV/mythtv/commit/e3473733710a7767bca61946c0f4424544457cd3
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: eb71f378f20b47c3545dbf67b841fa026c9435e9
      https://github.com/MythTV/mythtv/commit/eb71f378f20b47c3545dbf67b841fa026c9435e9
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 26d8debade984b01f241fb72eaf8a5c473d87be2
      https://github.com/MythTV/mythtv/commit/26d8debade984b01f241fb72eaf8a5c473d87be2
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: a55f1f4fe1ba2cac3d7773c6637ff76d5eba34b0
      https://github.com/MythTV/mythtv/commit/a55f1f4fe1ba2cac3d7773c6637ff76d5eba34b0
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 11050f2246bfc3dccc4d0b55bec7a222898c9f5f
      https://github.com/MythTV/mythtv/commit/11050f2246bfc3dccc4d0b55bec7a222898c9f5f
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: e0176819812b40f9fadb2ad76c1f885bfbb7c095
      https://github.com/MythTV/mythtv/commit/e0176819812b40f9fadb2ad76c1f885bfbb7c095
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 2d08c555e4e708b55851c9e9530a7b32052bf274
      https://github.com/MythTV/mythtv/commit/2d08c555e4e708b55851c9e9530a7b32052bf274
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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 public FFmpeg header "libavutil/intreadwrite.h".


  Commit: d12261d3dc797edd5a40bdf72409abc97d4cfa0a
      https://github.com/MythTV/mythtv/commit/d12261d3dc797edd5a40bdf72409abc97d4cfa0a
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 34abcf49f4bb510a5fb32e9bcee9917d163dda2b
      https://github.com/MythTV/mythtv/commit/34abcf49f4bb510a5fb32e9bcee9917d163dda2b
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: e834e2192ce18f08d36da7dda5cdd32c79e163db
      https://github.com/MythTV/mythtv/commit/e834e2192ce18f08d36da7dda5cdd32c79e163db
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 941f3c4351aab873c40186234554493023981bdf
      https://github.com/MythTV/mythtv/commit/941f3c4351aab873c40186234554493023981bdf
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 32ed326c9bda2a7aa61bd5d6597ba728306a7a91
      https://github.com/MythTV/mythtv/commit/32ed326c9bda2a7aa61bd5d6597ba728306a7a91
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 382b285b661660c2a8d380141127823146b07ee2
      https://github.com/MythTV/mythtv/commit/382b285b661660c2a8d380141127823146b07ee2
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 3cd458f7e48912ebb760de9313ef5c3e89ede508
      https://github.com/MythTV/mythtv/commit/3cd458f7e48912ebb760de9313ef5c3e89ede508
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: cb6cf092c57d51c5838f32a4c219dcee7eab289a
      https://github.com/MythTV/mythtv/commit/cb6cf092c57d51c5838f32a4c219dcee7eab289a
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 5aae5afffa409459c539166fcdad738053798d7a
      https://github.com/MythTV/mythtv/commit/5aae5afffa409459c539166fcdad738053798d7a
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 92e9bd7bb029551c46d8037427a8d73e06a1f8f5
      https://github.com/MythTV/mythtv/commit/92e9bd7bb029551c46d8037427a8d73e06a1f8f5
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 372680b64a90851f6805461cddfd46943c97fbc2
      https://github.com/MythTV/mythtv/commit/372680b64a90851f6805461cddfd46943c97fbc2
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 350ac65bee4744361b8e09bc46f590d10d141574
      https://github.com/MythTV/mythtv/commit/350ac65bee4744361b8e09bc46f590d10d141574
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: e8132ee0627c9c40bc87fab2a17d05460c3e6be8
      https://github.com/MythTV/mythtv/commit/e8132ee0627c9c40bc87fab2a17d05460c3e6be8
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 34d6a9f3206ea43622574f380b2e346cccada5a1
      https://github.com/MythTV/mythtv/commit/34d6a9f3206ea43622574f380b2e346cccada5a1
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 9718699be9bd9a387435f655131d1450ae6532cf
      https://github.com/MythTV/mythtv/commit/9718699be9bd9a387435f655131d1450ae6532cf
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 0a0cfe3fbdcc93b74a11e100b9c5787a95a998c5
      https://github.com/MythTV/mythtv/commit/0a0cfe3fbdcc93b74a11e100b9c5787a95a998c5
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 2b746f7072c3d33840228386e40c120ff64c0786
      https://github.com/MythTV/mythtv/commit/2b746f7072c3d33840228386e40c120ff64c0786
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 6cd76454dbe5d9f5ab60c068182028065d3b3c4e
      https://github.com/MythTV/mythtv/commit/6cd76454dbe5d9f5ab60c068182028065d3b3c4e
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: e372a30d61e517c60835620f72d408e9417a8ed6
      https://github.com/MythTV/mythtv/commit/e372a30d61e517c60835620f72d408e9417a8ed6
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 214365257f895ebc2be61573bb32f66df4f2ede3
      https://github.com/MythTV/mythtv/commit/214365257f895ebc2be61573bb32f66df4f2ede3
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: e4f0ee428cbbc660436dc23d57a8392a6424cbab
      https://github.com/MythTV/mythtv/commit/e4f0ee428cbbc660436dc23d57a8392a6424cbab
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: f92bd225d6e7453e57169fc8883e7989acaef2f2
      https://github.com/MythTV/mythtv/commit/f92bd225d6e7453e57169fc8883e7989acaef2f2
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 6d31d258ebf1635e7af320bd4349743d2048aedf
      https://github.com/MythTV/mythtv/commit/6d31d258ebf1635e7af320bd4349743d2048aedf
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 03fadcc197df932c90debc4639b2995ff84b4c6f
      https://github.com/MythTV/mythtv/commit/03fadcc197df932c90debc4639b2995ff84b4c6f
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 935643503a69e53dea1721ebec9d11e0b4796ad9
      https://github.com/MythTV/mythtv/commit/935643503a69e53dea1721ebec9d11e0b4796ad9
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: a19b43a61b6f5a12377401231142642039854245
      https://github.com/MythTV/mythtv/commit/a19b43a61b6f5a12377401231142642039854245
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 68351088b9ee6d8228ccb7f8b0964d2114ac14eb
      https://github.com/MythTV/mythtv/commit/68351088b9ee6d8228ccb7f8b0964d2114ac14eb
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 6b4b2a45253c46064da8cb84685e999360e39ee3
      https://github.com/MythTV/mythtv/commit/6b4b2a45253c46064da8cb84685e999360e39ee3
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: aa1fd99a00862a2487295190092a2677b3741bf0
      https://github.com/MythTV/mythtv/commit/aa1fd99a00862a2487295190092a2677b3741bf0
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: ef11a77fbf84582bd21d5f486e80d5ccb4e416d4
      https://github.com/MythTV/mythtv/commit/ef11a77fbf84582bd21d5f486e80d5ccb4e416d4
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 8a00e5fd2c21af4bb968927eaea4c224c943569d
      https://github.com/MythTV/mythtv/commit/8a00e5fd2c21af4bb968927eaea4c224c943569d
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 847e8e7b7446184d64af558cc8c53b3df3c70910
      https://github.com/MythTV/mythtv/commit/847e8e7b7446184d64af558cc8c53b3df3c70910
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: b8f44c1b9d3142ff83eec6358a04693418336533
      https://github.com/MythTV/mythtv/commit/b8f44c1b9d3142ff83eec6358a04693418336533
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: cc3854bd7e88d87ea3fa95940d3b16bd0bd99b45
      https://github.com/MythTV/mythtv/commit/cc3854bd7e88d87ea3fa95940d3b16bd0bd99b45
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: 02eb94a15989986ac8185ddf21a580ef328779de
      https://github.com/MythTV/mythtv/commit/02eb94a15989986ac8185ddf21a580ef328779de
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: e0598868f22e49caef7a109809fdc43d3a98e954
      https://github.com/MythTV/mythtv/commit/e0598868f22e49caef7a109809fdc43d3a98e954
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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


  Commit: d12c290ddcb9477ebba5c36bc1070cb8f387c1bd
      https://github.com/MythTV/mythtv/commit/d12c290ddcb9477ebba5c36bc1070cb8f387c1bd
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: c1a6b712a2ffcf66d14ed1dbe7f69951ded1db0b
      https://github.com/MythTV/mythtv/commit/c1a6b712a2ffcf66d14ed1dbe7f69951ded1db0b
  Author: ulmus-scott <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 588f7cf7b36f9943c415fcc79e3d5d3891e08065
      https://github.com/MythTV/mythtv/commit/588f7cf7b36f9943c415fcc79e3d5d3891e08065
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 156b2e43a3f0e30f8ee256066b2ead2b3c639cd8
      https://github.com/MythTV/mythtv/commit/156b2e43a3f0e30f8ee256066b2ead2b3c639cd8
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 61a9dc25f00a98890f9f0c01bef38487e79e6fd1
      https://github.com/MythTV/mythtv/commit/61a9dc25f00a98890f9f0c01bef38487e79e6fd1
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: db6737d26b9fa122c9435be032ef6f9e802ecef4
      https://github.com/MythTV/mythtv/commit/db6737d26b9fa122c9435be032ef6f9e802ecef4
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: 8721df1a50bd18fd03c7310f5767bd581ab44f23
      https://github.com/MythTV/mythtv/commit/8721df1a50bd18fd03c7310f5767bd581ab44f23
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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: fef8b9f80d876d6c7f2b75dfcdd37f54a55230b6
      https://github.com/MythTV/mythtv/commit/fef8b9f80d876d6c7f2b75dfcdd37f54a55230b6
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 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.


  Commit: 517cc6038245cb3717f00531c0daec9e9cd7824d
      https://github.com/MythTV/mythtv/commit/517cc6038245cb3717f00531c0daec9e9cd7824d
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

  Log Message:
  -----------
  libavformat/utils.c: fixup create mythtv custom mpegts demuxer

Since MythTV now allows forcing the use of FFmpeg's demuxer,
these comparisons need an additional comparison against
"mpegts-ffmpeg" for the behavior of both to be the same.

This bug presented itself as incorrect durations of files
when using the mpegts-ffmpeg demuxer.


  Commit: c72662299737d9d78788d62e41201f8775be4d4a
      https://github.com/MythTV/mythtv/commit/c72662299737d9d78788d62e41201f8775be4d4a
  Author: Scott Theisen <scott.the.elm at gmail.com>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

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

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

This reverts commit 50155e4d1b76a9457a91630efb96ef920ccf81ae.

These checks are necessary to ensure hardware decoders are properly initialized.

FindStreamInfo() may be clobbering the return value of avformat_find_stream_info()
so my interpretation of the code may have been incorrect.


Compare: https://github.com/MythTV/mythtv/compare/2c8dcece1d4c...c72662299737



More information about the mythtv-commits mailing list