Commit Graph

616 Commits

Author SHA1 Message Date
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
Michael Niedermayer 12f7253d0e Merge commit '82de8d71118f4eafd6a43e9ea9169bd411793798'
* commit '82de8d71118f4eafd6a43e9ea9169bd411793798':
  mpegts: Update the PSI/SI table only if the version change

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 04:24:06 +02:00
John Högberg 82de8d7111 mpegts: Update the PSI/SI table only if the version change
If a PAT is finished while a PMT section filter is opened but
not yet finished, the PMT section filter is closed and all
the received data is discarded.

This is usually not an issue but some multiplexers (With very
quick PAT/PMT repetition settings) consistently emit a PMT
section start, then a PAT, and then the rest of the PMT,
causing the aforementioned behavior to result in no PMT being
finished.

In the most pathologic situation the stream information are lost
and the probe fallback miscategorizes subtitles as mp3 audio.

Avoid the issue through eliminating redundant PSI/SI table
updates by checking their version field, which is required by
the standard to be incremented on every change no matter how
minor.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-28 21:09:59 +02:00
Michael Niedermayer 40d552dae6 Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'
* commit '1a3eb042c704dea190c644def5b32c9cee8832b8':
  Replace av_dlog with normal av_log at trace level

Conflicts:
	ffplay.c
	libavdevice/fbdev_dec.c
	libavfilter/avfilter.c
	libavfilter/internal.h
	libavfilter/setpts.c
	libavfilter/src_movie.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fieldorder.c
	libavformat/assdec.c
	libavformat/avidec.c
	libavformat/flvdec.c
	libavformat/http.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/mov.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/mpegtsenc.c
	libavformat/mux.c
	libavformat/mxfdec.c
	libavformat/nsvdec.c
	libavformat/oggdec.c
	libavformat/r3d.c
	libavformat/rtspdec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 03:19:47 +02:00
Vittorio Giovara 1a3eb042c7 Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Michael Niedermayer 1b3b018aa4 avformat/mpegts: Fix potential pointer overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-16 22:37:46 +01:00
Michael Niedermayer a0fe1a25fa Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'
* commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e':
  avformat: Don't anonymously typedef structs

Conflicts:
	libavformat/adtsenc.c
	libavformat/aiffenc.c
	libavformat/avidec.c
	libavformat/gif.c
	libavformat/iff.c
	libavformat/img2dec.c
	libavformat/jvdec.c
	libavformat/matroskadec.c
	libavformat/udp.c
	libavformat/wtvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-14 21:07:40 +01:00
Diego Biurrun daf8cf358a avformat: Don't anonymously typedef structs 2015-02-14 10:13:47 -08:00
Michael Niedermayer b61170f51d Merge commit '1509c018bd5b054a2354e20021ccbac9c934d213'
* commit '1509c018bd5b054a2354e20021ccbac9c934d213':
  mpegts: relax restrictions on matching the packet start in read_header

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-11 01:59:14 +01:00
Michael Niedermayer 702cf8d0de Merge commit '6a5b8ca4329039fad44ad50b6496948f4bfacb4c'
* commit '6a5b8ca4329039fad44ad50b6496948f4bfacb4c':
  lavf: remove unused code

Conflicts:
	libavformat/seek.c
	libavformat/seek.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-11 01:43:00 +01:00
Anton Khirnov 1509c018bd mpegts: relax restrictions on matching the packet start in read_header
analyze() is currently called both when probing and from read_header().
It determines the packet start by looking for the sync byte, followed by
unset Transport Error Indicator and valid adaptation_field_control.

This makes sense to do when probing, but once we already know the format
is MPEG-TS, it is counterproductive to be so strict -- e.g. in some
files the TEI might be set and analyze() might get called with a smaller
buffer than the one used for probing, resulting in a failure.
2015-02-10 21:43:44 +01:00
wm4 6a5b8ca432 lavf: remove unused code
Nothing uses it, and it provides no public API.

Archeological finds:

Commit 101036adb9 added the API.
Commit a8dd8dc6e9 made mpegts.c use it.
Commit af8aae3fa3 disabled it by default in mpegts.c.
Commit ae2bb52cd2 removed all uses of this from mpegts.c.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-08 21:34:05 +01:00
Hendrik Leppkes a9d700f212 mpegts: identify h264 mvc streams
This fixes missdetecting such streams as something else like AAC

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-14 01:39:16 +01:00
Michael Niedermayer 5318cf521f Merge commit '9cfa68c560bdec82d2d5ec079f9c5b0f9ca37af0'
* commit '9cfa68c560bdec82d2d5ec079f9c5b0f9ca37af0':
  mpegts: add support for Opus

Conflicts:
	libavcodec/opus_parser.c
	libavformat/mpegts.c

See: 74141f693d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-20 19:15:11 +01:00
Kieran Kunhya 9cfa68c560 mpegts: add support for Opus
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 11:29:19 +01:00
Michael Niedermayer 6781ec6714 Merge commit '8b263331c5ebbb10b6ea521e9fd56751ba94254b'
* commit '8b263331c5ebbb10b6ea521e9fd56751ba94254b':
  mpegts: check get16() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 04:43:41 +01:00
Vittorio Giovara 8b263331c5 mpegts: check get16() return value
And break flow of execution rather than exiting the function.

CC: libav-stable@libav.org
Bug-Id: CID 732186
2014-12-18 23:27:13 +01:00
Michael Niedermayer a4f387bf56 avformat/mpegts: Warn if ffio_ensure_seekback() failed
Should silence CID1257005

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 20:37:16 +01:00
Rafaël Carré 57bfafe76b avformat/mpegts: fix Opus stream count
That number represents the number of streams, not the number of channels

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-05 16:00:11 +01:00
Michael Niedermayer 41ad87ad8e avformat/mpegts: improve first valid PMT heuristic
This checks for audio+video instead of streams > 2
Fixes Ticket4090

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-08 21:35:20 +01:00
Michael Niedermayer 29b1af40f3 avformat/mpegts: add scan_all_pmts option
This allows selecting if the demuxer should consider all streams to be
found after the first PMT and add further streams during decoding or if it rather
should scan all that are within the analyze-duration and other limits

Fixes Ticket3762

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-08 21:35:20 +01:00
Michael Niedermayer 786594184a avformat/mpegts: fix iteration count in add_pid_to_pmt()
Fixes accessing uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-04 19:31:59 +01:00
Michael Niedermayer 3dae05f4f7 avformat/mpegts: also print PMT version in av_dlog()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-04 01:18:39 +01:00
Michael Niedermayer db0471c40f avformat/mpegts: Continue parsing PMTs during duration estimation
This way if we by chance run into a valid PMT we have a more complete
set of streams, also do not reset streams in case we run into a worse
PMT

Fixes Ticket4046

alternatively Ticket4046 could be closed as invalid or wontfix as it contains
some PMTs which lack the 2 subtitle streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-03 22:55:07 +01:00
Michael Niedermayer a6593f7cc6 avformat/mpegts: Do not add pid if its already there with add_pid_to_pmt()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-03 22:25:55 +01:00
Kieran Kunhya 61e42c1124 avformat/mpegts: Add support for Opus in MPEG-TS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 22:29:47 +01:00
Di Wu 0e406aba14 mpegts: add the judgement if a new program is created successfully
Add the judement after create a new program to avoid segment fault.

Signed-off-by: Di Wu <di1028.wu@samsung.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-16 04:21:21 +02:00
Michael Niedermayer 27f6da2921 avformat/mpegts: use a padded buffer in read_sl_header()
Fixes overread
Fixes: asan_heap-oob_84f75d_8_asan_heap-oob_a2a00a_341_mbc.ts

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 05:15:11 +02:00
Michael Niedermayer c3d7f00ee3 avformat/mpegts: Check desc_len / get8() return code
Fixes out of array read
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 04:30:59 +02:00
Michael Niedermayer 296cd9c432 avformat/mpegts: Improve probe heuristic by considering the overall frequency of 0x47 headers
Fixes Ticket3939

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-13 22:08:21 +02:00
Andreas Cadhalpun b76d6eb3bd avformat/mpegts: fix spelling error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-06 19:38:37 +02:00
Michael Niedermayer e489e83466 avformat/mpegts: Change order of structs to match 7968059e5c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-03 12:54:41 +02:00
Michael Niedermayer ee83f667af Merge commit '7968059e5c3cd8f91407f379c11bbf71a1b84c74'
* commit '7968059e5c3cd8f91407f379c11bbf71a1b84c74':
  mpegts: Allow custom max resync size

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-03 12:44:14 +02:00
Luca Barbato 7968059e5c mpegts: Allow custom max resync size 2014-09-03 02:38:03 +02:00
Michael Niedermayer 4250753497 avformat/mpegts: favor DESC_types over probed codecs
Fixes Ticket3766
Fixes dvb_teletext detection

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-01 03:22:34 +02:00
Michael Niedermayer 427bcdf035 avformat/mpegts: Use differential score for analyze()
This avoids high scores in random data that has a high 0x47 frequency

Fixes Ticket3844

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-16 23:24:51 +02:00
Marton Balint 51748b6377 mpegts: always parse pcr
Previously pcr transmitted without payload but as part of the video stream was
not parsed.

Signed-off-by: Marton Balint <cus@passwd.hu>
2014-08-16 13:24:39 +02:00
Michael Niedermayer fb33bff990 Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39':
  cosmetics: Write NULL pointer equality checks more compactly

Conflicts:
	cmdutils.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/dvbsub.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/dxa.c
	libavcodec/libxvid_rc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/rv10.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/zmbv.c
	libavdevice/v4l2.c
	libavformat/matroskadec.c
	libavformat/movenc.c
	libavformat/sdp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:00:50 +02:00
Gabriel Dume f929ab0569 cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 03:18:18 -07:00
James Almer 31b7ab9f06 lavf/mpegts: remove obsolete ff_mpegts_parse_* cruft
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-11 13:46:53 +02:00
James Almer d34ec64a22 replace calls to url_feof() with avio_feof()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 00:48:38 +02:00
Carl Eugen Hoyos 7c73d21523 lavf/mpegts: Do not return the result of a (void) function from a void function.
Fixes compilation with Sun C 5.10.
2014-08-07 09:55:40 +02:00
James Almer 5b12b4fc4b lavf/mpegts: rename ff_mpegts_parse_*() to avpriv_mpegts_parse_*()
The were wrongly being exported and used by libavdevice

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 04:28:11 +02:00
Carl Eugen Hoyos ff9a154157 Add int64_t probesize2 instead of int probesize to AVFormatContext.
Allows to set a probesize >2G.
Tested-by: Oliver Fromme
2014-07-30 11:09:25 +02:00
Michael Niedermayer c7168d1a22 Merge commit 'fc27e7272e6f1a7053812f8a15b1b7098de44c71'
* commit 'fc27e7272e6f1a7053812f8a15b1b7098de44c71':
  mpegts: do not export empty language tags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 02:34:12 +02:00
Jan Gerber fc27e7272e mpegts: do not export empty language tags
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-07-21 19:39:31 +00:00
Michael Niedermayer 4470a3eeaf avformat/mpegts: dont clear programs during probing
Fixes Ticket 3763

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 21:49:15 +02:00
Michael Niedermayer c6c172d173 avformat/mpegts: skip updating programs/streams when determining duration
Fixes Ticket2441

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 16:43:27 +02:00
Alexander V. Lukyanov 5adcef9c1b mpegts: pass MpegTSContext ptr explicitly
AVFormatContext->priv_data is not always a MpegTSContext, it can be
RTSPState when decoding a RTP stream. So it is necessary to pass
MpegTSContext pointer explicitly.

Within libav, the write_section_data function doesn't actually use
the MpegTSContext at all, so this doesn't change anything at the
moment (no memory was corrupted before), but it reduces the risk of
anybody trying to touch the MpegTSContext via AVFormatContext->priv_data
in the future.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-07-10 11:24:19 +03:00
Alexander V. Lukyanov 8635954335 avformat/mpegts: pass MpegTSContext ptr explicitly (fixes #3721)
AVFormatContext->priv_data is not always a MpegTSContext, it can be
RTSPState when decoding a RTP stream. So it is necessary to pass
MpegTSContext pointer explicitly.

This fixes memory corruption from bug #3721 (RTSPState is smaller than
MpegTSContext thus innocent memory gets overwritten).

Signed-off-by: Alexander V. Lukyanov <lavv17f@gmail.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 22:06:18 +02:00
Carl Eugen Hoyos 958168d505 lavf/mpegts: Reduce number of "Predefined SLConfigDescriptor" warnings shown. 2014-06-09 23:20:14 +02:00
Marton Balint 6c5375100c mpegts: always reset pes packet state on new packet
Fixes ticket #3584.

Signed-off-by: Marton Balint <cus@passwd.hu>
2014-05-05 22:33:52 +02:00
Marton Balint a78274329c mpegts: unref buffer in reset_pes_packet_state
Signed-off-by: Marton Balint <cus@passwd.hu>
2014-05-05 22:33:52 +02:00
Marton Balint d7ca914988 mpegts: factorize pes packet state reset function
Signed-off-by: Marton Balint <cus@passwd.hu>
2014-05-05 22:33:52 +02:00
Marton Balint e2752de344 mpegts: fix indentation after last commit
Signed-off-by: Marton Balint <cus@passwd.hu>
2014-05-05 22:33:52 +02:00
Marton Balint 9ba8debce9 mpegts: only emit new packets if data buffer exists
I don't think this can acutally happen in the current code, but better safe
than sorry.

Fixes Coverity CID 732217.

Signed-off-by: Marton Balint <cus@passwd.hu>
2014-05-05 22:33:52 +02:00
Marton Balint a82e87618f mpegts: remove uneeded buf_size check
It is already ensured by the loop condition

Signed-off-by: Marton Balint <cus@passwd.hu>
2014-05-05 22:33:52 +02:00
Michael Niedermayer ff6fa0b4b9 avformat/mpegts: Remove redundant check
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 02:35:50 +02:00
Marton Balint d2f60547c2 mpegts: fix teletext pts of streams with standalone pcr pid
Signed-off-by: Marton Balint <cus@passwd.hu>
2014-03-22 13:55:01 +01:00
Marton Balint d83a5b5218 mpegts: add pcr filter for tracking standalone pcr pids
Signed-off-by: Marton Balint <cus@passwd.hu>
2014-03-22 13:55:01 +01:00
Marton Balint 6bab55b84c mpegts: factorize mpegts filter creator code
Signed-off-by: Marton Balint <cus@passwd.hu>
2014-03-22 13:54:59 +01:00
Marton Balint 4acc86bcfb mpegts: move last_pcr to MpegTSFilter level
Signed-off-by: Marton Balint <cus@passwd.hu>
2014-03-22 13:41:22 +01:00
Michael Niedermayer 7ae5cadb0a Merge commit 'ca80e15814b77efe8d0ff5a5b0220754bb6c4065'
* commit 'ca80e15814b77efe8d0ff5a5b0220754bb6c4065':
  mpegts: Forward error codes in various functions

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-18 13:30:20 +01:00
Michael Niedermayer ceb0d79f46 Merge commit '86ba2327e1cf35c6f77d5fb516a1a7a8dce0b98a'
* commit '86ba2327e1cf35c6f77d5fb516a1a7a8dce0b98a':
  mpegts: K&R formatting cosmetics

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-18 13:19:24 +01:00
Keiji Costantini ca80e15814 mpegts: Forward error codes in various functions
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-03-18 08:20:35 +01:00
Keiji Costantini 86ba2327e1 mpegts: K&R formatting cosmetics
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-03-18 08:07:43 +01:00
Marton Balint d08bb065f2 mpegts: use goto out instead of break on truncated or invalid pmt tables
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 02:28:25 +01:00
Michael Niedermayer 8cc581fbf7 Merge commit '5397386effba2e53e4ff82852a86f6be4d59e9c1'
* commit '5397386effba2e53e4ff82852a86f6be4d59e9c1':
  mathops: move macro to the only place it is used

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-04 13:38:04 +01:00
Vittorio Giovara 5397386eff mathops: move macro to the only place it is used
This helps in disentangling lavf and lavc too.
2014-03-04 11:45:31 +01:00
Michael Niedermayer 0bf882864e Revert "mpegts: do not set pts for missing dts in video streams"
This reverts commit f65afef1df.

If only pts is coded then dts must be equal pts
See Rec. ITU-T H.222.0 (06/2012) / ISO/IEC 13818-1:2013 (E) 2.7.5

Found-by: Baptiste Coudurier
2014-03-02 13:12:31 +01:00
Michael Niedermayer c849b00b80 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libavformat/mpegts: expose raw packet size

Conflicts:
	libavformat/mpegts.c

See: f9b997c337
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-20 02:10:05 +01:00
Leandro Dorileo 8370a6fa59 libavformat/mpegts: expose raw packet size
We cannot easily determine if an mpeg TS's packet size is DVHS, FEC
or so on, for that we need to expose the internal raw_packet_size
field.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-02-19 21:52:17 +01:00
mrlika e2707a7cf7 avformat/mpegts: DVB subtitles multiple languages support
Copy multiple languages data from PMT to extradata. New 5 bytes
per language extradata format.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-14 00:01:28 +01:00
Michael Niedermayer 29986885ef avformat/mpegts: Continue parsing PMTs until at least 2 streams are found or 100kb are reached
This (ugly) hack fixes Ticket3348
If someone has an idea on how to fix this nicer, that would be very welcome
but the stream contains several PMTs with just one of the 2 streams at the start

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-29 05:44:03 +01:00
Michael Niedermayer ad61419bbf avformat/mpegts: drop stray space
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-29 05:43:39 +01:00
Serhii Marchuk 1d07385053 mpegts demuxer: store PMT values of DVB teletext to extradata
* Using extradata by TS demuxer to store values from PMT
* Support of multiple languages in one DVB teletext stream:
  comma separated language codes in metadata "language" field

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 22:14:01 +01:00
Anssi Hannula 4a4437c0fb avformat/mpegts: demux timed ID3 metadata
Used in some HLS streams ("Timed Metadata for HTTP Live Streaming").

This is just ID3 tags at arbitrary stream positions, but I still added
"timed" to the codec name to avoid confusion with regular non-stream ID3
tags.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2013-12-31 03:13:12 +02:00
Michael Niedermayer e630ca5111 avformat/mpegts: check sl.timestamp_len
Fixes: msan_uninit-mem_7ff4404547ba_4883_dmbts.ts
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 11:53:53 +01:00
Leandro Dorileo f9b997c337 libavformat/mpegts: expose raw packet size
We cannot easily determine if an mpeg TS's packet size is DVHS, FEC
or so on, for that we need to expose the internal raw_packet_size
field.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 19:06:32 +01:00
Joakim Plate 6eda91ad54 mpegts: stop analyzing when pmt for all programs have been found
This disables NOHEADER after finding PMT for all programs to
avoid find_stream_info always exhausting probe size for mpegts.

This is very important for live streams since read speed
will be limited. rtsp, udp and any protocol streaming a live
mpegts will have dramatically faster startup time.

Note, lack of codec parameters for streams can still cause
the full probe size to be exhausted.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 21:43:19 +01:00
Carl Eugen Hoyos 9fa75be96d mpegts: add HEVC registration descriptor 2013-12-12 16:10:15 +01:00
Rainer Hochecker f65afef1df mpegts: do not set pts for missing dts in video streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-04 02:18:04 +01:00
Michael Niedermayer 7d0e927a31 avformat/mpegts: fix resync seek
The seek ended up seeking before the begin, which caused problems
Fixes initial sync issues with libbluray
Fixes Ticket3117

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-18 16:38:12 +01:00
Michael Niedermayer e624df5dc3 mpegts: only calculate stat index when its needed during probe
40% faster probe

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-09 16:09:26 +01:00
Michael Niedermayer 9825b99eca avformat/mpegts: do not hardcode type used in memset()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-09 16:03:41 +01:00
Mickaël Raulet b6a4701612 mpegts: Support HEVC demuxing
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-31 20:20:57 +01:00
Peter Ross 69a042ee95 mpegts: demux synchronous SMPTE 336M Key-Length-Value (KLV) metadata
Fixes ticket #2579.
2013-10-28 19:31:58 +01:00
Carl Eugen Hoyos d0b7d24b80 Support HEVC in transport streams. 2013-10-16 17:54:37 +02:00
Mickaël Raulet 93c1fe4de3 hevc: add ts demux support
cherry picked from commit 925ee44364a7bce58e2ac5bac91077ce0a75d883

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-15 23:48:00 +02:00
Paul B Mahol a807c68253 avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:13:38 +00:00
Michael Niedermayer 5dc6c0ea9e avformat/mpegts: check avio_tell() return code before using it
Fixes Ticket2962

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 16:43:55 +02:00
Michael Niedermayer cbe47b1e84 Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'
* commit 'f369b9356c4606cd4d713d60f7db5de119d901fa':
  avformat: Use av_reallocp_array() where suitable

Conflicts:
	libavformat/asfenc.c
	libavformat/gxfenc.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 11:23:40 +02:00
Alexandra Khirnova f369b9356c avformat: Use av_reallocp_array() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-10 12:38:32 +02:00
Michael Niedermayer a660991921 avformat/mpegts: Ensure that mpegts_get_dts() only considers packets at or after the given position
This fixes an infinite loop
An alternative fix would be to revert d73cbc22c5
but that would worsen error resilience.

Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-04 01:02:06 +02:00
Michael Niedermayer d73cbc22c5 avformat/mpegts: resync from the smallest packet size on
This avoids the loss of a packet in many cases if the packet size was wrong.
It also improves detection of packet size changes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:59:04 +02:00
Michael Niedermayer b4429c259a mpegts_get_pcr: dont loose a packet when resyncing
This matches how read_packet() works

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:48:19 +02:00
Michael Niedermayer 0f2f65bd58 mpegts: fix pos47_full
The value was off by a packet

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:45:39 +02:00
Michael Niedermayer ee7f2609a0 avformat/mpegts: print packet size warning only if new size differs from old
No case is known to have triggered this, but its more correct to check that the
new size differs.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:45:39 +02:00
Michael Niedermayer c666c59ac1 mpegts: reanalyze packet size on mismatches
Fixes Ticket1812
Fixes Ticket2838

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 16:40:18 +02:00
Michael Niedermayer a0fb608396 Merge commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0'
* commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0':
  avio: Add const qualifiers to ffio_read_indirect

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 12:04:46 +02:00
Ben Avison 5afe1d2791 avio: Add const qualifiers to ffio_read_indirect
This provides at least some protection against potential accidental
corruption of AVIO buffer workspace.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 11:09:00 +03:00
Michael Niedermayer 5b13778f93 mpegts: remove usage of MOD_UNLIKELY()
Its not needed and doing nothing is faster than doing a optimized MOD

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 19:56:20 +02:00
Michael Niedermayer 0df55e1ba8 Merge commit 'a22ae9f0c579793f411e2bd7a8db557091a3a4ae'
* commit 'a22ae9f0c579793f411e2bd7a8db557091a3a4ae':
  mpegts: Remove one 64-bit integer modulus operation per packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 16:23:32 +02:00
Michael Niedermayer 5dd8ca7d1b Merge commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855'
* commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855':
  mpegts: Make discard_pid() faster for single-program streams

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:16:35 +02:00
Michael Niedermayer 4ed0b28a45 Merge commit 'cabb1681697555e2c319c37c1f30f149207e9434'
* commit 'cabb1681697555e2c319c37c1f30f149207e9434':
  mpegts: Remove one memcpy per packet

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:11:55 +02:00
Marton Balint a7bb12a307 mpegts: add fix_teletext_pts mpegts demuxer option
Changes since v1 of the patch:
- enable option by default
- add documentation
- move up PTS override code after PES header parsing, to ensure we use the
  last PCR before the first packet of the teletext PES packet.

The option overrides teletext packet PTS and DTS values with the timestamps
calculated from the PCR of the first program which the teletext stream is part
of and is not discarded.

Using the same teletext PID for multiple programs is possible, therefore we
need some kind of heuristics to know which program PCR we should synchronize
to. Using the first non-discarded PCR pid among the programs of the teletext
stream seemed like a good choice.

The patch does not do PCR interpolation to estimate the PCR of the teltetext
packet, it just uses the last PCR of the program, which may cause a slight
error (0.1 sec) in the teletext packet pts-es.

Based on a patch by Reimar Döffinger.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-September/131610.html

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 02:47:38 +02:00
Ben Avison a22ae9f0c5 mpegts: Remove one 64-bit integer modulus operation per packet
The common case of the pointer having increased by one packet (which results
in no change to the modulus) can be detected with a 64-bit subtraction,
which is far cheaper than a division on many platforms.

           Before          After
           Mean   StdDev   Mean   StdDev  Change
Divisions   248.3  8.8      51.5   7.4    +381.7%
Overall    2773.2 25.6     2372.5 43.1     +16.9%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-05 19:25:55 +03:00
Ben Avison c84ea750cf mpegts: Make discard_pid() faster for single-program streams
When a stream contains a single program, there's no point in doing a
PID -> program lookup. Normally the one and only program isn't disabled,
so no packets should be discarded.

              Before          After
              Mean   StdDev   Mean   StdDev  Change
discard_pid()   73.8  9.4       20.2  1.5    +264.8%
Overall       2300.8 28.0     2253.1 20.6      +2.1%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-05 15:18:42 +03:00
Ben Avison cabb168169 mpegts: Remove one memcpy per packet
This was being performed to ensure that a complete packet was held in
contiguous memory, prior to parsing the packet. However, the source buffer
is typically large enough that the packet was already contiguous, so it is
beneficial to return the packet by reference in most cases.

         Before          After
         Mean   StdDev   Mean   StdDev  Change
memcpy    720.7  32.7     649.8  25.1   +10.9%
Overall  2372.7  46.1    2291.7  21.8    +3.5%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-05 15:14:31 +03:00
Marton Balint d75d911223 mpegts: save last pcr of pcr pids in PES Context
Based on a patch by Reimar Döffinger.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-September/131610.html

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 03:27:47 +02:00
Michael Niedermayer b009267910 mpegts: only reopen pmt_cb filter if its different from the previous.
Fixes Ticket2632

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 04:02:02 +02:00
Michael Niedermayer 8a8d9a7385 mpegts: use ffio_ensure_seekback()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-04 19:13:39 +02:00
Michael Niedermayer 4e99660493 mpegts: use seek_back() for all seek backs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:50 +02:00
Michael Niedermayer a5f23d8da0 mpegts: factor seek_back() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:46 +02:00
Michael Niedermayer b7c6685268 mpegts_read_header: goto fail instead of return directly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-30 16:23:42 +02:00
Michael Niedermayer 231795270b Merge commit 'b164d66e35d349de414e2f0d7365a147aba8a620'
* commit 'b164d66e35d349de414e2f0d7365a147aba8a620':
  ape: make version-dependent decoding functions called via pointers
  mpegts: add support for stream_type 0x42, which is CAVS

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-15 13:28:38 +01:00
Can Wu 81cf53e133 mpegts: add support for stream_type 0x42, which is CAVS
This allows demuxing and muxing of CAVS TS streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-15 09:33:24 +01:00
Michael Niedermayer a9ddb62489 Merge commit '1ecdf8912b9ced51b3267cdcdce5e394d0a3bf8e'
* commit '1ecdf8912b9ced51b3267cdcdce5e394d0a3bf8e':
  avformat: av_log_ask_for_sample() ---> avpriv_request_sample()

Conflicts:
	libavformat/mxfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-14 12:41:34 +01:00
Michael Niedermayer fa92ee821b Merge commit '63d744e2be39466e3a734c2987cd713e0bac101e'
* commit '63d744e2be39466e3a734c2987cd713e0bac101e':
  av_log_missing_feature() ---> avpriv_report_missing_feature()

Conflicts:
	libavcodec/aacdec.c
	libavcodec/tta.c
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-14 12:30:19 +01:00
Diego Biurrun 1ecdf8912b avformat: av_log_ask_for_sample() ---> avpriv_request_sample() 2013-03-13 20:42:21 +01:00
Diego Biurrun 63d744e2be av_log_missing_feature() ---> avpriv_report_missing_feature() 2013-03-13 20:42:21 +01:00
Michael Niedermayer 806a66fd08 mpegts: clear avprograms only for removed programs
Fixes Ticket2186

Requested-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-10 02:28:05 +01:00
Michael Niedermayer 2653e12520 Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'
* commit '1afddbe59e96af75f1c07605afc95615569f388f':
  avpacket: use AVBuffer to allow refcounting the packets.

Conflicts:
	libavcodec/avpacket.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavformat/avidec.c
	libavformat/flacdec.c
	libavformat/id3v2.c
	libavformat/matroskaenc.c
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08 19:12:03 +01:00
Anton Khirnov 1afddbe59e avpacket: use AVBuffer to allow refcounting the packets.
This will allow us to avoid copying the packets in many cases.

This breaks ABI.
2013-03-08 07:33:45 +01:00
Carl Eugen Hoyos f8b6d4818e Only try to auto-detect LATM in mpegts if the LOAS demuxer was configured.
This allows to decode LATM-in-mpegts without the LOAS demuxer.
2013-01-24 01:21:13 +01:00
Michael Niedermayer c3f3c22563 Merge commit 'a717f9904227d7979473bad40c50eb40af41d01d'
* commit 'a717f9904227d7979473bad40c50eb40af41d01d':
  mpegts: Share the cleanup code between the demuxer and lavf-internal parser functions
  rtpdec_mpeg4: Return one AAC AU per AVPacket
  ppc: Include string.h for memset

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 13:45:36 +01:00
Martin Storsjö a717f99042 mpegts: Share the cleanup code between the demuxer and lavf-internal parser functions
The lavf-internal parser functions are used when receiving
mpegts over RTP. This fixes memory leaks in this setup.

The normal mpegts demuxer close function was updated in ec7d0d2e in
2004 to fix leaks, but the parsing function used for RTP wasn't
updated and has been leaking ever since.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:14:17 +02:00
XBMC 4c41fc88df mpegts: update AVProgram after pmt change
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-25 20:30:36 +01:00
Michael Niedermayer 7726916c14 mpegts: check av_new_stream() return value.
Fixes CID703728
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-13 17:46:17 +01:00
Peter Ross 9282fbb9ad mpegts: demux asynchronous SMPTE 336M Key-Length-Value (KLV) metadata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-09 17:15:46 +01:00
Michael Niedermayer 57cee85023 Merge commit '096abfa15052977eed93f0b5e01afd2d47c53c1f'
* commit '096abfa15052977eed93f0b5e01afd2d47c53c1f':
  parser: fix large overreads
  bitstream: add get_bits64() to support reading more than 32 bits at once
  arm: detect cpu features at runtime on Linux

Conflicts:
	libavcodec/parser.c
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 14:58:56 +01:00
Michael Niedermayer b2b12a1022 mpegts: rename get_bits64 to get_ts64
Renaming because of name conflict

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 14:52:50 +01:00
Michael Niedermayer 41540b36a1 bitstream: add get_bits64() to support reading more than 32 bits at once
Also remove a duplicate function in the MPEG-TS demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Michael Niedermayer 03290ffb57 mpegts: check that codec is not open in mpegts_find_stream_type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-03 17:34:38 +01:00
Michael Niedermayer 8897b5aa4c mpegts_set_stream_info: remove unneeded codec id check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-03 17:29:56 +01:00
Michael Niedermayer eab022d863 mpegts: prevent freeing ones own section in pat_cb
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 21:45:53 +01:00
Michael Niedermayer 4facddd568 mpegts: dont set stream info when a decoder has already been opened.
Fixes assertion failure.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 15:44:13 +01:00
Michael Niedermayer 327cd0d09b mpegts: prevent freeing ones own section in pmt_cb
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-13 15:44:13 +01:00
Michael Niedermayer 304ebed586 mpegts_probe: detect files with garbage at the begin.
Fixes Ticket1811

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-01 17:22:04 +01:00
Michael Niedermayer f464b02d22 mpegts: fuzzy crc check for not so spec compliant files
Fixes Ticket598

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 05:25:27 +02:00
Michael Niedermayer 82db8ee321 Merge commit 'fd41cb43702498948ff14ba8c284fd5c15fc729d'
* commit 'fd41cb43702498948ff14ba8c284fd5c15fc729d':
  avconv: improve sample format negotiation for decoder request
  Opus encoder using libopus
  mpegts: Drop pointless casting of hex_dump_debug arguments
  avformat: const correctness for av_hex_dump / av_hex_dump_log
  wmadec: Adjust debug printf argument length modifier

Conflicts:
	Changelog
	ffmpeg.c
	libavcodec/libopusdec.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-02 14:58:19 +02:00
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun 15d35bee83 mpegts: Drop pointless casting of hex_dump_debug arguments 2012-10-01 13:18:28 +02:00
Diego Biurrun 72eaba5e4f avformat: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Michael Niedermayer c942e8b1d7 Merge commit '07584eaf4a95db3f11d3bc411f9786932829e82b'
* commit '07584eaf4a95db3f11d3bc411f9786932829e82b':
  mpegts: check substreams before discarding
  Add a smooth streaming segmenter muxer
  file: Add an avoption for disabling truncating existing files on open
  img2dec: always close AVIOContexts
  rtpdec_jpeg: Error out on other unsupported type values as well
  rtpdec_jpeg: Disallow using the reserved q values
  rtpdec_jpeg: Fold the default qtables case into an existing if statement
  rtpdec_jpeg: Store and reuse old qtables for q values 128-254
  rtpdec_jpeg: Simplify the calculation of the number of qtables
  rtpdec_jpeg: Add more comments about the fields in the SOF0 section
  rtpdec_jpeg: Clarify where the subsampling magic numbers come from
  rtpdec_jpeg: Don't use a bitstream writer for the EOI marker
  rtpdec_jpeg: Don't needlessly use a bitstream writer for the header
  rtpdec_jpeg: Simplify writing of the jpeg header
  rtpdec_jpeg: Merge two if statements
  rtpdec_jpeg: Write the DHT section properly

Conflicts:
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-13 15:22:16 +02:00
Christian Schmidt 07584eaf4a mpegts: check substreams before discarding
Allow to extract the AC3 core from TrueHD with the "copy" codec.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-12 23:43:53 +02:00
Michael Niedermayer 5710dbf88c mpegts: Fix potential memory leak in mpegts_read_packet()
This leak can happen in case of some error paths.

Found-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 05:21:47 +02:00
Michael Niedermayer d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Martin Storsjö e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00