| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit ab1319d82f0c77308792fa2d88cbfc73c3e47cb7)
Signed-off-by: Michael Niedermayer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 9152c1e4955, the mpegts parser was taught how to parse
PMT sections which contained multiple tables. That commit
fixed parsing of PMT packets from some cable providers,
which included a special SCTE table (0xc0) before the
standard program map table (0x2).
Sometimes, however, the combined 0xc0 and 0x2 tables are
larger than a single TS packet (188 bytes). The mpegts parser
already attempts to parse sections which span multiple packets,
but still assumed that the split section only contained one
table.
This patch fixes parsing of such a sample[1].
Before:
Input #0, mpegts, from 'combined-pmt-tids-split.ts':
Duration: 00:00:01.26, start: 39188.931756, bitrate: 597 kb/s
Program 1
No Program
Stream #0:0[0xeff]: Audio: ac3, 48000 Hz, mono, fltp, 64 kb/s
Stream #0:1[0xefd]: Audio: mp3, 0 channels, fltp
Stream #0:2[0xefe]: Unknown: none
After:
Input #0, mpegts, from 'combined-pmt-tids-split.ts':
Duration: 00:00:01.27, start: 39188.931756, bitrate: 589 kb/s
Program 1
Stream #0:0[0xefd]: Video: h264 ([27][0][0][0] / 0x001B), none, 59.94 fps, 59.94 tbr, 90k tbn, 180k tbc
Stream #0:1[0xefe](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 384 kb/s
Stream #0:2[0xeff](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, mono, fltp, 64 kb/s
Stream #0:3[0xf00]: Data: scte_35
Stream #0:4[0xf01]: Unknown: none (ETV1 / 0x31565445)
Stream #0:5[0xf02]: Unknown: none (ETV1 / 0x31565445)
Stream #0:6[0xf03]: Unknown: none ([192][0][0][0] / 0x00C0)
With the patch, the PMT is parsed correctly so the streams are
created in the correct order, are associated with "Program 1",
and their codecs are set correctly.
[1] https://s3.amazonaws.com/tmm1/combined-pmt-tids-split.ts
Signed-off-by: Aman Gupta <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit cd86c5dbcca5e79c979a6a04da25155ccf17f843)
|
|
|
|
|
| |
Signed-off-by: Aman Gupta <[email protected]>
(cherry picked from commit 64bf915cd851ab604cb87cd463725fd1c6460a1c)
|
|
|
|
|
|
|
| |
http://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-valgrind&time=20180513001958
Signed-off-by: Aman Gupta <[email protected]>
(cherry picked from commit 42a03e77000692ad6de032b8cf684e1d6ec73790)
|
|
|
|
|
| |
Signed-off-by: Aman Gupta <[email protected]>
(cherry picked from commit 7db022e67bab568a560c8bd55f5840e71a34dc15)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes PMT parsing in some mpegts streams which contain
multiple tables within the PMT pid. Previously, the parser
assumed only one table was present in each packet, and discarded
the rest of the section data after attempting to parse the first
table.
A similar issue was documented in the BeyondTV software[1], which
helped me diagnose the same bug in the ffmpeg mpegts demuxer. I also
tried DVBInspector, libdvbpsi's dvbinfo, and tstools' tsinfo to
help debug. The former two properly read PMTs with multiple tables,
whereas the last has the same bug as ffmpeg.
I've created a minimal sample[2] which contains the combined PMT.
Here's what ffmpeg probe shows before and after this patch:
Before:
Input #0, mpegts, from 'combined-pmt-tids.ts':
Duration: 00:00:01.08, start: 4932.966167, bitrate: 741 kb/s
Program 1
No Program
Stream #0:0[0xf9d]: Audio: ac3, 48000 Hz, mono, fltp, 96 kb/s
Stream #0:1[0xf9b]: Audio: mp3, 0 channels, fltp
Stream #0:2[0xf9c]: Unknown: none
After:
Input #0, mpegts, from 'combined-pmt-tids.ts':
Duration: 00:00:01.11, start: 4932.966167, bitrate: 718 kb/s
Program 1
Stream #0:0[0xf9b]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv, top first), 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
Stream #0:1[0xf9c](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2[0xf9d](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, mono, fltp, 96 kb/s
With the patch, the PMT is parsed correctly so the streams are
created in the correct order, are associated with "Program 1",
and their codecs are set correctly.
[1] http://forums.snapstream.com/vb/showpost.php?p=343816&postcount=201
[2] https://s3.amazonaws.com/tmm1/combined-pmt-tids.ts
Signed-off-by: Aman Gupta <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 9152c1e495551535886cfd7a8d7c0a206691443e)
|
|
|
|
|
| |
Signed-off-by: Aman Gupta <[email protected]>
(cherry picked from commit 07d9c31055e6e07629506246d68d93b84bec1507)
|
|
|
|
|
| |
Signed-off-by: Aman Gupta <[email protected]>
(cherry picked from commit 1a14e39145816597b97db46dbb30e37feddf246c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This mimics the logic flow in all the other callbacks
(pat_cb, sdt_cb, m4sl_cb), and avoids calling skip_identical()
for non PMT_TID packets.
Since skip_identical modifies internal state like
MpegTSSectionFilter.last_ver, this change prevents unnecessary
reprocessing on some streams which contain multiple tables in
the PMT pid. This can be observed with streams from certain US
cable providers, which include both tid=0x2 and another unspecified
tid=0xc0.
Signed-off-by: Aman Gupta <[email protected]>
(cherry picked from commit 2c500f50972c19f25ebca783ba9374d6a0c23efb)
|
|
|
|
| |
Signed-off-by: Aman Gupta <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The supplementary audio descriptor is defined in ETSI EN 300 468 and
provides more details regarding accessibility audio tracks, especially
the normative annex J contains a detailed description of its use.
Its language code (if present) overrides the language code of an also
present ISO 639 language descriptor.
Note that this also changes the priority of multiple descriptors with
language from "the last descriptor with language within the ES loop" to
"specific descriptor over general ISO 639 descriptor".
Signed-off-by: Aman Gupta <[email protected]>
|
| |
|
|
|
|
|
|
| |
It is also used in the wild to signal latm.
Fixes ticket #6657.
|
|
|
|
|
|
|
| |
Fixes detection of some TV sample as 24.5 FPS. With the patch applied,
it's detected as 25 FPS.
This is enabled for mpegts only.
|
|\
| |
| |
| |
| |
| |
| | |
* commit '83548fe894cdb455cc127f754d09905b6d23c173':
lavf: fix usage of AVIOContext.seekable
Merged-by: James Almer <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It is supposed to be a flag. The only currently defined value is
AVIO_SEEKABLE_NORMAL, but other ones may be added in the future.
However all the current lavf code treats this field as a bool (mainly
for historical reasons).
Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
|
| |
| |
| |
| |
| |
| | |
Silences an "assignment discards ‘const’ qualifier" warning.
Reviewed-by: Marton Balint
|
| |
| |
| |
| |
| | |
Reviewed-by: Michael Niedermayer <[email protected]>
Signed-off-by: Andreas Cadhalpun <[email protected]>
|
| |
| |
| |
| |
| |
| | |
They somehow got lost along the patch versions.
Signed-off-by: Marton Balint <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is negative, so can't be used for left shifting.
This fixes ubsan runtime error: shift exponent -1 is negative
Reviewed-by: Michael Niedermayer <[email protected]>
Signed-off-by: Andreas Cadhalpun <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
Reviewed-by: Marton Balint <[email protected]>
Acked-by: Michael Niedermayer <[email protected]>
Signed-off-by: Carlos Fernandez <[email protected]>
Signed-off-by: Marton Balint <[email protected]>
|
|\|
| |
| |
| |
| |
| |
| | |
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
cosmetics: Fix spelling mistakes
Merged-by: Clément Bœsch <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Diego Biurrun <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
this removes the need to probe to discover aac streams
inside mpegts containers, thus speeding up initial playback.
Reviewed-by: Hendrik Leppkes <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '74d98d1b0e0e7af444c933ea3c472494de3ce6f2':
mpegts: Validate the SL Packet Header Configuration
See e630ca5111077fa8adc972fe8a3d7e2b3e8dc91f
Our local timestamp_len > 64 is adjusted to > 63 to match the Libav
check and the actual specifications (14496-1, 10.2.2).
There is no need to request a sample as it violates the specifications
and such a file would likely be the result of a crafted/fuzzed sample.
On the other hand, the clipping of the value is kept for extra safety.
Merged-by: Clément Bœsch <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
timeStampLength, OCRLength and AU_Length have well specified upper
boundaries.
Signed-off-by: Luca Barbato <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
Fixes mis-detection of tiff as mpegts
Fixes Ticket5565
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| |
| |
| | |
Fixes Ticket5566
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| |
| |
| | |
stream
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| |
| | |
This allows to recognize ID3 packets from their corresponding descriptor
tag.
|
| |
| |
| |
| | |
Related to ticket #5501.
|
| |
| |
| |
| | |
Fixes Debian bug 823098.
|
| |
| |
| |
| |
| |
| | |
This fixes demuxing of 01c56b0dc1.ts
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Michael Niedermayer <[email protected]>
|
|\|
| |
| |
| |
| |
| |
| | |
* commit '9765549f551ff40869aee1a6492b6a976c86cfe9':
mpegts: Forward the errors on mpeg4 objects parsing
Merged-by: Derek Buitenhuis <[email protected]>
|
| |
| |
| |
| | |
Signed-off-by: Luca Barbato <[email protected]>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '9200514ad8717c63f82101dc394f4378854325bf':
lavf: replace AVStream.codec with AVStream.codecpar
This has been a HUGE effort from:
- Derek Buitenhuis <[email protected]>
- Hendrik Leppkes <[email protected]>
- wm4 <[email protected]>
- Clément Bœsch <[email protected]>
- James Almer <[email protected]>
- Michael Niedermayer <[email protected]>
- Rostislav Pehlivanov <[email protected]>
Merged-by: Derek Buitenhuis <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.
In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.
There are multiple important problems with this approach:
- the fields in AVCodecContext are in general one of
* stream parameters
* codec options
* codec state
However, it's not clear which ones are which. It is consequently
unclear which fields are a demuxer allowed to set or a muxer allowed to
read. This leads to erratic behaviour depending on whether decoding or
encoding is being performed or not (and whether it uses the AVStream
embedded codec context).
- various synchronization issues arising from the fact that the same
context is used by several different APIs (muxers/demuxers,
parsers, bitstream filters and encoders/decoders) simultaneously, with
there being no clear rules for who can modify what and the different
processes being typically delayed with respect to each other.
- avformat_find_stream_info() making it necessary to support opening
and closing a single codec context multiple times, thus
complicating the semantics of freeing various allocated objects in the
codec context.
Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
|
| |
| |
| |
| | |
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
transport_error_indicator
transport_error_indicator is not required to be 0
Fixes probing
Fixes Ticket 4862
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows to copy information related to the stream ID from the demuxer
to the muxer, thus allowing for example to retain information related to
synchronous and asynchronous KLV data packets. This information is used
in the muxer when remuxing to distinguish the two kind of packets (if the
information is lacking, data packets are considered synchronous).
The fate reference changes are due to the use of
av_packet_merge_side_data(), which increases the size of the output
packet size, since side data is merged into the packet data.
|
| |
| |
| |
| |
| |
| | |
Fixes Ticket 4864
Signed-off-by: Michael Niedermayer <[email protected]>
|
| |
| |
| |
| |
| |
| | |
This will be used by the subsequent commit(s)
Signed-off-by: Michael Niedermayer <[email protected]>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes assertion failure
Fixes: 4321db8ac331f5967ebfbfe80ce5eb78/signal_sigabrt_7ffff6ae7cc9_7213_0d6457b9d6897fa7c78507fa5de53510.ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <[email protected]>
|
| | |
|
| | |
|
|\|
| |
| |
| |
| |
| |
| | |
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
avpacket: Replace av_free_packet with av_packet_unref
Merged-by: Hendrik Leppkes <[email protected]>
|