FFmpeg git repo
Go to file
Mattias Wadman 78812cd147 avcodec/h2645_parse: Don't treat 0x000002 as a start code and truncate
According to ITU-T H.265 7.4.2.1 this byte sequence should not appear in a
NAL unit but in practice in rare cases it seems it does, possibly due to buggy
encoders. Other players like VLC and Quicktime seem to be fine with it.

Currently when this sequence is found it is treated as if the next start code
has been found and the NAL unit gets truncated.

This change limits the code to only look for first start code 0x0000001 or
first escape 0x000003.

Sadly i can't share the original source file with the issue but the first
80 bytes of the NAL unit looks like this:

       │00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f│0123456789abcdef│
0x00000│00 00 00 01 02 01 d0 bc 57 a1 b8 44 70 01 00 0b│........W..Dp...│
0x00010│80 2e 00 c2 6c ec 3e b9 e3 03 fb 91 2e d2 43 cb│....l.>.......C.│
0x00020│1d 2c 00 00 02 00 02 00 5c 93 72 6f 31 76 18 00│.,......\.ro1v..│
0x00030│08 38 aa b1 4c 33 3f fd 08 cb 77 9b d4 3c db 02│.8..L3?...w..<..│
0x00040│a2 04 73 15 75 de 3b c4 67 c0 8f ca ad 31 f1 99│..s.u.;.g....1..│

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-02-18 07:33:27 +01:00
compat configure: Set WIN32_LEAN_AND_MEAN at configure time 2023-08-14 22:57:28 +03:00
doc avutil/pixfmt: Add AV_VIDEO_MAX_PLANES 2024-02-16 21:34:38 +01:00
ffbuild riscv: test for assembler support 2023-12-08 17:21:09 +02:00
fftools all: use designated initializers for AVOption.unit 2024-02-14 14:53:41 +01:00
libavcodec avcodec/h2645_parse: Don't treat 0x000002 as a start code and truncate 2024-02-18 07:33:27 +01:00
libavdevice all: use designated initializers for AVOption.unit 2024-02-14 14:53:41 +01:00
libavfilter avfilter/v360: Use AV_VIDEO_MAX_PLANES 2024-02-16 21:34:38 +01:00
libavformat avformat/libsrt: Fix srt:// URL query string parsing 2024-02-15 00:34:16 +01:00
libavutil avutil/pixfmt: Add AV_VIDEO_MAX_PLANES 2024-02-16 21:34:38 +01:00
libpostproc Bump versions after 6.1 2023-10-29 16:19:14 +01:00
libswresample all: use designated initializers for AVOption.unit 2024-02-14 14:53:41 +01:00
libswscale swscale/tests/swscale: Add help text 2024-02-15 23:07:44 +01:00
presets
tests checkasm/rv34dsp: add rv34_idct_dc_add test 2024-02-17 14:33:35 +02:00
tools tools/target_dec_fuzzer: Adjust threshold for QPEG 2023-12-29 01:15:41 +01:00
.gitattributes lavf/assenc: normalize line endings to \n 2024-02-11 17:01:07 -08:00
.gitignore
.mailmap .mailmap: update my mailmap entry 2024-02-06 10:34:15 +01:00
.travis.yml
Changelog lavc/bsf: add a showinfo filter 2024-02-02 15:41:54 +01:00
configure avutil/thread: add support for setting thread name on *bsd and solaris 2024-02-04 20:45:10 +01:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS Use https for repository links 2023-03-01 21:59:10 +01:00
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: remove myself from here 2024-02-04 22:22:42 +01:00
Makefile configure: Add a --disable-version-tracking option 2023-12-21 11:00:34 +02:00
README.md
RELEASE

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides means to alter decoded audio and video through a directed graph of connected filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.