1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

564 Commits

Author SHA1 Message Date
Aman Gupta
e9391ab121 avformat/mpegts: enhance logging in trace mode
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-14 21:34:23 +02:00
Michael Niedermayer
00c4861f13 avformat/mpegts: adjust probe score for low check_count
Fixes mis-detection of tiff as mpegts
Fixes Ticket5565

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-14 02:20:10 +02:00
Michael Niedermayer
e01b19dece avformat/mpegts: Fix probing of mpegts with invalid ASC
Fixes Ticket5566

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-07 15:46:08 +02:00
Michael Niedermayer
a5eb70ad95 avformat/mpegts: Do not trust BSSD descriptor, it is sometimes not an S302M stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-06 21:56:51 +02:00
Stefano Sabatini
4b38df82c2 lavf/mpegts: add ID3 entry to the REGD_types array
This allows to recognize ID3 packets from their corresponding descriptor
tag.
2016-05-19 18:26:32 +02:00
Carl Eugen Hoyos
80d14de52d lavf/mpegts: Add E-AC3 registered stream specifier "EAC3".
Related to ticket #5501.
2016-05-03 10:51:35 +02:00
Carl Eugen Hoyos
88a849c714 lavf/mpegts: Return small probe score for very short transport streams.
Fixes Debian bug 823098.
2016-05-01 15:39:13 +02:00
Michael Niedermayer
dbe1dd59e0 avformat/mpegts: Skip over broken 0x80 headers
This fixes demuxing of 01c56b0dc1.ts

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-24 02:51:50 +02:00
Michael Niedermayer
ea41ab0987 avformat/mpegts: factor duplicate seek back code into mpegts_resync
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-24 02:51:50 +02:00
Derek Buitenhuis
0520d573db Merge commit '9765549f551ff40869aee1a6492b6a976c86cfe9'
* commit '9765549f551ff40869aee1a6492b6a976c86cfe9':
  mpegts: Forward the errors on mpeg4 objects parsing

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-14 14:01:31 +01:00
Derek Buitenhuis
6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Michael Niedermayer
38a6242b27 avformat/mpegts: Remove unused argument from analyze()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-10 13:32:26 +02:00
Michael Niedermayer
ee7a642b0e avformat/mpegts: Check adaption field control in analyze() more instead of transport_error_indicator
transport_error_indicator is not required to be 0

Fixes probing
Fixes Ticket 4862

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-10 13:32:25 +02:00
Luca Barbato
9765549f55 mpegts: Forward the errors on mpeg4 objects parsing
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-03-20 01:04:12 +01:00
Stefano Sabatini
14f7a3d55a lavc/lavf: transmit stream_id information for mpegts KLV data packets
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.
2016-02-23 18:44:12 +01:00
Anton Khirnov
9200514ad8 lavf: replace AVStream.codec with AVStream.codecpar
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.
2016-02-23 17:01:58 +01:00
Michael Niedermayer
4bec36f98c avformat/mpegts: consider stream_type 4 just a hint toward mp3 and not definite
Fixes Ticket 4864

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-24 20:47:25 +01:00
Michael Niedermayer
676a93f2d8 avformat: Add av_program_add_stream_index()
This will be used by the subsequent commit(s)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-11 22:27:25 +01:00
Clément Bœsch
43ecec0f03 avformat: use AV_OPT_TYPE_BOOL in a bunch of places 2015-12-04 15:43:33 +01:00
Nicolas George
085ab74972 lavf/mpegts: use AVERROR_INVALIDDATA instead of AVERROR(EINTR). 2015-12-03 19:16:12 +01:00
Michael Niedermayer
3692d859f4 avformat/mpegts: Only start probing data streams within probe_packets
Fixes assertion failure
Fixes: 4321db8ac331f5967ebfbfe80ce5eb78/signal_sigabrt_7ffff6ae7cc9_7213_0d6457b9d6897fa7c78507fa5de53510.ts

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-05 17:06:02 +01:00
Hendrik Leppkes
6255bf3d0d mpegts: Fix FATE seek test 2015-10-27 15:42:59 +01:00
Hendrik Leppkes
c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Hendrik Leppkes
7f5af80ba4 Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
  avpacket: Replace av_free_packet with av_packet_unref

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 14:28:56 +01:00
Luca Barbato
ce70f28a17 avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Hendrik Leppkes
4b7685b6c6 Merge commit 'cc8db760616a7ec3bd39b22ca45888c01326db13'
* commit 'cc8db760616a7ec3bd39b22ca45888c01326db13':
  mpegts: use avcodec_get_type() to set codec_type

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 13:45:23 +02:00
wm4
cc8db76061 mpegts: use avcodec_get_type() to set codec_type
Note that this slightly changes behavior: it sets AVMEDIA_TYPE_UNKNOWN
if the codec type is unknown. This should be ok.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 10:50:50 +02:00
James Almer
655b6dcb34 lavc/lavf: remove incompatible abi checks for the new 64bit fields
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-17 11:36:16 -03:00
Carl Eugen Hoyos
b290972b8f lavf: Switch probesize and max_analyze_duration to 64bit.
Both are only accessible through AVOptions.
2015-09-15 18:02:51 +02:00
Petri Hintukainen
5d12d7de2c mpegts: demux BluRay text subtitles
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-01 14:35:32 +02:00
Petri Hintukainen
757cb0f286 mpegts: fix demuxing PES private stream 2
PES header size is 6 bytes (00 00 01 bf XX XX), not 0.
BluRay text subtitles use private stream 2.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-01 14:35:32 +02:00
Carl Eugen Hoyos
670d8ecfae lavf: Remove probesize32 and max_analyze_duration32 on version bump.
Add FF_API_PROBESIZE_32 to allow removing 32bit probesize and 32bit
max_analyze_duration after the next libavformat version bump.
2015-09-01 09:19:49 +02:00
Ronald S. Bultje
229843aa35 Replace av_dlog with ff_dlog.
ff_dlog checks compilability, and is non-public. av_dlog is deprecated
and no longer exists if FF_API_DLOG=0.
2015-08-18 10:24:01 -04:00
Stefano Sabatini
fedc422684 lavf/mpegts: apply misc option description fixes
Use impersonal form, drop capitalization and ending dot.
2015-08-14 12:08:57 +02:00
Michael Niedermayer
29d147c94d Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
* commit '059a934806d61f7af9ab3fd9f74994b838ea5eba':
  lavc: Consistently prefix input buffer defines

Conflicts:
	doc/examples/decoding_encoding.c
	libavcodec/4xm.c
	libavcodec/aac_adtstoasc_bsf.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.h
	libavcodec/asvenc.c
	libavcodec/avcodec.h
	libavcodec/avpacket.c
	libavcodec/dvdec.c
	libavcodec/ffv1enc.c
	libavcodec/g2meet.c
	libavcodec/gif.c
	libavcodec/h264.c
	libavcodec/h264_mp4toannexb_bsf.c
	libavcodec/huffyuvdec.c
	libavcodec/huffyuvenc.c
	libavcodec/jpeglsenc.c
	libavcodec/libxvid.c
	libavcodec/mdec.c
	libavcodec/motionpixels.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/noise_bsf.c
	libavcodec/nuv.c
	libavcodec/nvenc.c
	libavcodec/options.c
	libavcodec/parser.c
	libavcodec/pngenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/qsvdec.c
	libavcodec/svq1enc.c
	libavcodec/tiffenc.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/utvideoenc.c
	libavcodec/vc1dec.c
	libavcodec/wmalosslessdec.c
	libavformat/adxdec.c
	libavformat/aiffdec.c
	libavformat/apc.c
	libavformat/apetag.c
	libavformat/avidec.c
	libavformat/bink.c
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/id3v2.c
	libavformat/isom.c
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/mpc.c
	libavformat/mpc8.c
	libavformat/mpegts.c
	libavformat/mvi.c
	libavformat/mxfdec.c
	libavformat/mxg.c
	libavformat/nutdec.c
	libavformat/oggdec.c
	libavformat/oggparsecelt.c
	libavformat/oggparseflac.c
	libavformat/oggparseopus.c
	libavformat/oggparsespeex.c
	libavformat/omadec.c
	libavformat/rawdec.c
	libavformat/riffdec.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_qdm2.c
	libavformat/rtpdec_svq3.c
	libavformat/sierravmd.c
	libavformat/smacker.c
	libavformat/smush.c
	libavformat/spdifenc.c
	libavformat/takdec.c
	libavformat/tta.c
	libavformat/utils.c
	libavformat/vqf.c
	libavformat/westwood_vqa.c
	libavformat/xmv.c
	libavformat/xwma.c
	libavformat/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:15:19 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Michael Niedermayer
c8c86b8f9b avformat/mpegts: Replace silent cliping of language_count by asserts
Failure should not be possible, if it does occur then the code is
buggy and should be fixed not silently clip

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 18:15:17 +02:00
Michael Niedermayer
42aa02418e avformat/mpegts: Use DVB_TELETEXT timestamp heuristic also for DVB subtitles
Fixes Ticket4200

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 15:38:40 +02:00
John Högberg
42bc768e52 mpegts: Add jpeg2000 stream type
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-30 10:08:16 +02:00
Michael Niedermayer
088b410ea2 Merge commit '42bc768e5240ec01237ad2eb7c69b917158de258'
* commit '42bc768e5240ec01237ad2eb7c69b917158de258':
  mpegts: Add jpeg2000 stream type

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-30 13:08:26 +02:00
Carl Eugen Hoyos
77c0b149be lavf/mpegts: Return 0 if the probe function does not detect mpegts.
Reduces console spamming on debug level.
2015-06-29 16:27:36 +02:00
Michael Niedermayer
b64e70436e avformat/mpegts: Use STREAM_TYPE_PRIVATE_DATA instead of 6
Suggested-by: Wolfgang Lorenz <wl-chmw@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-23 03:42:12 +02:00
Michael Niedermayer
d59a033a69 avformat/mpegts: recognizes and export private streams
Based on patch by Wolfgang Lorenz <wl-chmw@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 13:59:00 +02:00
Michael Niedermayer
c465254fbf avformat/mpegts: Do not ignore registration descriptors when probing is enabled
This is required for the (not yet in git) private stream detection/export,
no other testcase known

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 23:50:46 +02:00
Michael Niedermayer
db07fc2020 avformat/mpegts: Avoid float in bitrate calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 12:02:44 +02:00
Michael Niedermayer
e0153145f6 avformat/mpegts: Detect changes in packet through CRC instead of just the 5bit version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-01 02:14:14 +02:00
Michael Niedermayer
4b6be54bed avformat/mpegts: reset last_ver on corrupted packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-01 02:13:26 +02:00
Michael Niedermayer
4e8d01f20c avformat/mpegts: Factorize version checking code out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-01 01:29:43 +02:00
Michael Niedermayer
14e9a20083 avformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet
Fixes Detecting AAC with such descriptor if the parts needed for detection
are later in the stream

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 18:26:28 +02:00
Michael Niedermayer
6397814926 avformat/mpegts: reset last_version on seeking
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 05:00:51 +02:00