1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Go to file
zheng qian 6ad61e30a1 avformat/mpegtsenc: Fix mpegts_write_pes() for private_stream_2 and other types
According to the PES packet definition defined in Table 2-17 of ISO_IEC_13818-1
specification, some fields like PTS/DTS or pes_extension could only appears if
the stream_id meets the condition:

if (stream_id != 0xBC &&  // program_stream_map
    stream_id != 0xBE &&  // padding_stream
    stream_id != 0xBF &&  // private_stream_2
    stream_id != 0xF0 &&  // ECM
    stream_id != 0xF1 &&  // EMM
    stream_id != 0xFF &&  // program_stream_directory
    stream_id != 0xF2 &&  // DSMCC_stream
    stream_id != 0xF8)    // ITU-T Rec. H.222.1 type E stream

And the following stream_id types don't have fields like PTS/DTS:

else if ( stream_id == program_stream_map
|| stream_id == private_stream_2
|| stream_id == ECM
|| stream_id == EMM
|| stream_id == program_stream_directory
|| stream_id == DSMCC_stream
|| stream_id == ITU-T Rec. H.222.1 type E stream ) {
    for (i = 0; i < PES_packet_length; i++) {
        PES_packet_data_byte
    }
}

Current implementation skipped the check of stream_id causing some kind of
streams like private_stream_2 to be incorrectly written with actually a
private_stream_1-like PES header with PTS/DTS field. For example, Japan DTV
transmits news and alerts through ARIB superimpose that utilizes
private_stream_2 still could not be remuxed correctly for now.

This patch set fixes the remuxing for private_stream_2 and
other stream_id types.

Signed-off-by: zheng qian <xqq@xqq.im>
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-28 21:32:22 +02:00
compat atomics: Fix the win32 atomic_exchange function 2021-04-04 11:06:08 +03:00
doc doc/APIchanges: add hashes and version numbers for recent entries 2021-04-27 18:42:25 -03:00
ffbuild libavresample: Remove deprecated library 2021-04-27 10:43:13 -03:00
fftools avformat: remove deprecated AVStream.codec 2021-04-27 11:47:24 -03:00
libavcodec avcodec/flacenc: Remove always-true check 2021-04-28 17:42:37 +02:00
libavdevice avdevice: Constify all devices 2021-04-27 11:48:05 -03:00
libavfilter avfilter: Constify all AVFilters 2021-04-27 11:48:05 -03:00
libavformat avformat/mpegtsenc: Fix mpegts_write_pes() for private_stream_2 and other types 2021-04-28 21:32:22 +02:00
libavutil hwcontext_vulkan: reorder structure fields and add spaces in between 2021-04-28 18:18:05 +02:00
libpostproc Bump major versions of all libraries. 2021-04-27 11:48:05 -03:00
libswresample Bump major versions of all libraries. 2021-04-27 11:48:05 -03:00
libswscale Bump major versions of all libraries. 2021-04-27 11:48:05 -03:00
presets
tests avcodec/codec, allcodecs: Constify the AVCodec API 2021-04-27 10:43:14 -03:00
tools avcodec/codec, allcodecs: Constify the AVCodec API 2021-04-27 10:43:14 -03:00
.gitattributes
.gitignore
.mailmap mailmap: add entry for myself 2021-03-09 02:09:55 +00:00
.travis.yml
Changelog avformat/westwoodaudenc: Adds muxer for Westwood AUD format. 2021-04-26 19:56:33 +10:00
configure avfilter: Constify all AVFilters 2021-04-27 11:48:05 -03:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: add myself as adpcm maintainer 2021-03-25 12:51:10 +10:00
Makefile libavresample: Remove deprecated library 2021-04-27 10:43:13 -03:00
README.md
RELEASE Bump Versions before release/4.4 branch 2021-03-20 01:01:12 +01:00

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 a mean to alter decoded Audio and Video through chain of 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.