Derek Buitenhuis
4ffdba2418
mpegts: Make the sdt_period a double
...
Having it as a float didn't even allow enough precision to check
for INT_MAX/2.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Derek Buitenhuis
516d34de42
mpegts: Make the pat_period a double
...
Having it as a float didn't even allow enough precision to check
for INT_MAX/2.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Michael Niedermayer
b5e716ae13
avformat/mpegtsenc: Add sdt_period, similar to pat_period
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
34da54fd1a
avformat/mpegtsenc: Support a user specified PAT/PMT period
...
Can be used to fix Ticket3714
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Michael Niedermayer
a9c1545a33
avformat/mpegtsenc: support storing PAT/PMT per frame
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
10 years ago
Luca Barbato
4512ee78e1
mpegts: Mark the muxer as supporting variable fps
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Carl Eugen Hoyos
1d5edad8cc
lavf/mpegtsenc: Only fail aac muxing if the first frame is invalid.
...
Fixes ticket #3957 .
10 years ago
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
...
This applies to every library where performance is not critical.
10 years ago
Carl Eugen Hoyos
d0c895d3c5
lavf/mpegtsenc: Accept 0x000001 as startcode for hevc.
...
Fixes ticket #4194 .
10 years ago
Martin Storsjö
7d097a0fc5
mpegtsenc: Take max_delay into account when buffering multiple audio packets into one PES packet
...
Make sure we don't buffer up more than max_delay worth of data
before writing a PES packet, even if pes_payload_size is set to
a larger value.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Carl Eugen Hoyos
56ffde3f61
Allow muxing h264 into ts with startcode "001" instead of "0001".
...
Fixes ticket #2220 .
Fixes ticket #4324 .
10 years ago
Martin Storsjö
8e32b1f096
libavformat: Use ffio_free_dyn_buf where applicable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
33650e0e42
avformat/mpegtsenc: Do not create invalid files from annex b streams without SPS/PPS
...
use global headers to create SPS/PPS when they are available
Fixes Ticket4248
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Matt Oliver
22504396fe
avformat/mpegtsenc: Fix build with msvc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c348a42dcc
Revert "avformat/mpegtsenc: Change the service_type field to enum"
...
This isnt safe due to AVOption accessing this field as int
i just realized a moment after pushing
This reverts commit 0935453e84
.
10 years ago
Michael Niedermayer
0935453e84
avformat/mpegtsenc: Change the service_type field to enum
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
dhead666
48e36f8a12
libavformat/mpegtsenc: allow to set service_type in sdt
...
This adds an option to set the service type in mpegts as defined in ETSI 300 468.
I added what I believe are the most useful service types as pre defined values,
the others can be sent by using their hexdecimal form directly (e.g. -mpegts_service_type digital_radio, -mpegts_service_type 0x07).
I've been using this patch in order to pipe internet radio stream (originally as HLS/m3u8) from ffmpeg to tvheadend,
when the service type set right tvheadend recognize the mpegts stream as a radio channel.
The patch in its original form was written by linuxstb from freenode's hts channel which allowed me pushing it upstream.
This close issue 4118.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
f7a4589b36
avformat/mpegtsenc: Use av_freep() to avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
e2ce163922
mpegts: Support running the write_trailer function without an AVIOContext
...
If opening and closing dynamic buffers as AVIOContext, we may
not have any AVIOContext available when wanting to close and
deallocate the muxer. Allow calling write_trailer despite this.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Florent Le Coz
2e0935965b
Drop the unofficial extension prefix for MPEG and MPEG-TS formats
...
As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003
CC: libav-stable@libav.org
10 years ago
Jean-Baptiste Mardelle
7319a47c7e
mpegtsenc: recognize .mts as MPEG Transport Stream
10 years ago
Fredrik Axelsson
8f8caca224
Add support for BDAV/m2ts-mode muxing
...
Signed-off-by: Fredrik Axelsson <fraxbe@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
dedicatedbroadcastsolutions
873dac50f5
avformat/mpegtsenc: change the min value for mpegts_start_pid to allow ATSC PIDs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
28816050e4
lavf: Set the stream time base hint properly for chained muxers
...
This avoids warnings about using the codec time base as time
base hint.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
aaeae281a8
avformat/mpegtsenc: More verbose warning messages in case of missing video ES startcodes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Moritz Barsnick
66d02d3ca6
align and correct messages regarding bitstream filters
...
The messages regarding the recommended use of bitstream filters are somewhat different.
This also adds the ":v" stream specifier to "-bsf h264_mp4toannexb".
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
e8049af132
mpegts: Do not try to write a PMT larger than SECTION_SIZE
...
Prevent out of array writes.
Similar to what Michael Niedermayer did to address the same issue.
Bug-Id: CVE-2014-2263
CC: libav-stable@libav.org
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Carl Eugen Hoyos
fddea3f074
Check for hevc startcode when muxing into mpeg-ts.
11 years ago
Nidhi Makhijani
8dca0877e3
mpegts: Return proper error code on invalid input data
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Diego Biurrun
454697603e
mpegts: Use av_free() to free memory allocated by av_strdup()
11 years ago
Michael Niedermayer
92a28e9f56
avformat/mpegtsenc: Use av_freep() for pids
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
31eaecfee9
avformat/mpegtsenc: Free services array completely on failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
12b59e57f3
avformat/mpegtsenc: Use correct deallocation code on failure of pids array allocation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5f8300afc6
mpegtsenc: Check dynarray_add() for failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
92deb28945
avformat/mpegtsenc: use the correct deallocation functions
...
Found-by: Carl Eugen Hoyos <ce@hoyos.ws>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
5b220e1e19
mpegts: Fix memory leaks and related crashes in mpegs_write_header()
11 years ago
Diego Biurrun
f8ab9f2fe3
mpegts: Avoid unnecessary variable shadowing
11 years ago
Diego Biurrun
6d6bd3a3db
mpegts: Drop some unnecessary parentheses
11 years ago
Diego Biurrun
b7b1bf9166
mpegts: K&R formatting cosmetics
11 years ago
Femi Adeyemi-Ejeye
2601a9447e
mpegts: Add HEVC definitions
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Luca Barbato
89616408e3
mpegts: Define the section length with a constant
...
The specification says the value is expressed in 10 bits including
the 4-byte CRC.
11 years ago
Michael Niedermayer
6cdf409884
avformat/mpegtsenc: do not flush after everything
...
there is flushing code in the avformat core that does this in a more
controlled way.
Fixes ticket2748
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
194be1f43e
lavf: switch to AVStream.time_base as the hint for the muxer timebase
...
Previously, AVStream.codec.time_base was used for that purpose, which
was quite confusing for the callers. This change also opens the path for
removing AVStream.codec.
The change in the lavf-mkv test is due to the native timebase (1/1000)
being used instead of the default one (1/90000), so the packets are now
sent to the crc muxer in the same order in which they are demuxed
(previously some of them got reordered because of inexact timestamp
conversion).
11 years ago
Luca Barbato
f121dbd9f7
mpegts: Provide an option to override the pcr period
...
Certain hardware demuxer have specific restrictions for PCR periodicity.
11 years ago
Luca Barbato
3f7e94eccd
mpegts: Move the option section to the bottom
...
Makes it consistent with the rest of the formats and ease usage
of macros constants for the defaults.
11 years ago
Florent Le Coz
fdcb2873e1
Fix the mime types for MPEG and MPEG-TS formats
...
As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003
11 years ago
Michael Niedermayer
6552e23d56
avformat/mpegtsenc: fix dts for chained muxing aac in mpegts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Aman Gupta
72fed6d122
avformat/mpegtsenc: fix minor typo in omit_video_pes_length description
...
Signed-off-by: Aman Gupta <ffmpeg@tmm1.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
goodthanks
c9cfd45838
avformat/mpegtsenc: Allow DTS audio copy to TS streams
...
This doesn't allow encoding of DTS or TrueHD. It just sets the correct
stream ID in the TS output file when a DTS or TrueHD audio stream is copied.
Fixes ticket #1398
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
66e30a2e65
avformat/mpegtsenc: check avformat_new_stream() return
...
Fixes CID1206645
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago