Commit Graph

18879 Commits

Author SHA1 Message Date
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
Carl Eugen Hoyos
7e1e25c2dc lavf/avio: Remove linebreak from https warning. 2016-04-10 15:39:13 +02: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
Carl Eugen Hoyos
b0c026a27f lavf/rawenc: Add a raw gsm muxer. 2016-04-09 11:44:50 +02:00
Carl Eugen Hoyos
56cb465b38 lavf/gsmdec: Add raw gsm autodetection.
Fixes bug 555.
2016-04-09 11:38:46 +02:00
Paul B Mahol
a4790e1890 avformat/nistshperedec: add support for mu-law as sample-byte-format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-08 22:34:38 +02:00
Paul B Mahol
259879d32d avformat/nistspheredec: fix silly bug
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-08 13:19:00 +02:00
Paul B Mahol
0c9490609d avformat: support shorten in nistshpere demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-07 22:15:41 +02:00
Paul B Mahol
2d720069a9 avformat: add aix demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-07 09:08:53 +02:00
Paul B Mahol
56a3a3f01c avformat: add musx demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-05 10:49:34 +02:00
Paul B Mahol
76466ab214 avformat/brstm: lower magic number, fixes decoding of some files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-03 19:20:44 +02:00
Hendrik Leppkes
6518cbc52a lavc/utils: Introduce ff_bprint_to_codecpar_extradata for avformat
It will be used by text subtitle demuxers to construct format instructions
straight into extradata. They all currently a similar function that accepts
an AVCodecContext instead.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-03 13:04:17 -04:00
Michael Niedermayer
06c4ed0c0e avformat/wavdec: fix typo with len
Found-by: carl
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-03 17:56:02 +02:00
Michael Niedermayer
cf4d050b72 avformat/wavdec: Remove direct s->pb->buffer access
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-03 03:25:28 +02:00
Derek Buitenhuis
fcbdc44f4e wavdec: Only set the codec ID in read_header
WAV is not a NOHEADER format, and thus should not be changing
stream codec IDs and probing in read_packet.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-03 01:55:57 +02:00
Rodger Combs
4b150fbe1f lavf/segment: add option to write empty filler segments as needed 2016-04-02 13:31:26 -05:00
Rodger Combs
5b4f44f66a lavf/segment: slight refactor to seg_write_packet
This reduces some code duplication, and ensures that cur_entry.last_duration is
always set.
2016-04-02 13:31:26 -05:00
Rodger Combs
44a9395b5a lavf/segment: style nit 2016-04-02 13:31:26 -05:00
Rodger Combs
d38fe9f493 lavf/segment: support automatic bitstream filtering
Most useful for MPEG-TS. Works by having the underlying muxer configure the
bitstream filters, then moving them to our own AVStreams.
2016-04-02 03:03:13 -05:00
Derek Buitenhuis
54ccaaeb2b psxstr: Remove some commented out code
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-03-31 21:46:14 +01:00
James Almer
9bf3d01d91 avformat/latmenc: auto-insert aac_adtstoasc bitstream filter when needed
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-03-30 21:58:48 -03:00
James Almer
d5a3578350 avformat/svag: fix division by zero
Fixes ticket #5386

Signed-off-by: James Almer <jamrial@gmail.com>
2016-03-28 21:34:08 -03:00
Lou Logan
06eef96b69 fix some a/an typos
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-03-28 14:13:17 -08:00
Marton Balint
8ff0f6ae82 avformat/segment: set format options for all segments
Fixes ticket #5318.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-03-26 23:26:27 +01:00
Michael Niedermayer
c06bdc60c9 avformat/rtpdec: Remove stray debug av_log()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-26 11:02:58 +01:00
Ico Doornekamp
e3e6a2cff4 avformat/rtpdec_jpeg: fix low contrast image on low quality setting
Original mail and my own followup on ffmpeg-user earlier today:

I have a device sending out a MJPEG/RTP stream on a low quality setting.
Decoding and displaying the video with libavformat results in a washed
out, low contrast, greyish image. Playing the same stream with VLC results
in proper color representation.

Screenshots for comparison:

  http://zevv.nl/div/libav/shot-ffplay.jpg
  http://zevv.nl/div/libav/shot-vlc.jpg

A pcap capture of a few seconds of video and SDP file for playing the
stream are available at

  http://zevv.nl/div/libav/mjpeg.pcap
  http://zevv.nl/div/libav/mjpeg.sdp

I believe the problem might be in the calculation of the quantization
tables in the function create_default_qtables(), the attached patch
solves the issue for me.

The problem is that the argument 'q' is of the type uint8_t. According to the
JPEG standard, if 1 <= q <= 50, the scale factor 'S' should be 5000 / Q.
Because the create_default_qtables() reuses the variable 'q' to store the
result of this calculation, for small values of q < 19, q wil subsequently
overflow and give wrong results in the calculated quantization tables. The
patch below uses a new variable 'S' (same name as in RFC2435) with the proper
range to store the result of the division.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-24 15:40:10 +01:00
Michael Niedermayer
26811fd946 avformat/mpegtsenc: Fix used service
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-24 12:35:19 +01:00
Michael Niedermayer
50d017a281 avformat/mpegtsenc: Keep track of the program for each service
Simplifies code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-24 12:27:23 +01:00
Carl Eugen Hoyos
ef888de1c1 lavf/img2dec: Skip COM when auto-detecting jpeg.
It could theoretically contain invalid data that gets ignored by decoders.
2016-03-22 11:13:24 +01:00
Thomas Volkert
b4f32c42ab rtpdec: support for VC-2 HQ RTP payload format (draft v1) 2016-03-22 00:17:12 +01:00
Michael Niedermayer
6e65b9bb1f avformat/utils: scan a bit farther for a keyframe in mpeg/mpegts (7 sec instead of 5, we already scan 90sec in some cases by default)
Fixes Ticket5305

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-21 20:46:29 +01:00
Neil Birkbeck
e7e5c5e6c4 lavf/matroskaenc.c: add early support for colour elements
Adding early support for a subset of the proposed colour elements
according to the latest version of spec:
https://mailarchive.ietf.org/arch/search/?email_list=cellar&gbt=1&index=hIKLhMdgTMTEwUTeA4ct38h0tmE

Like matroskadec, I've left out elements for pix_fmt related things
 as there still seems to be some discussion around these.

The new elements are exposed under strict experimental mode.

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-21 00:10:18 +01:00
Marton Balint
65efcaeb84 avformat/mov: read start_pad from edit list start time if codec is aac
Related to ticket #2324, #2325.

Stream duration still need to be fixed...

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-03-20 19:51:28 +01:00
Marton Balint
25f707694c avformat/utils: increase detected start_time with skip_samples
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-03-20 19:51:05 +01:00
Clément Bœsch
8284a4ba11 lavf/dv: use c->sys->frame_size in dv_frame_offset()
dv_frame_offset() is static and called only from dv_read_seek(), where
c->sys->frame_size is already used.

This simplifies the incoming codecpar merge where
avctx->{coded_width,coded_height,time_base} are not accessible anymore.
2016-03-20 19:28:15 +01:00
Clément Bœsch
6c0cf11f38 lavf/dv: reindent after previous commit 2016-03-20 19:28:15 +01:00
Clément Bœsch
35ba5c424b lavf/dv: do not check for c->sys
dv_extract_video_info() is a static function called only from
avpriv_dv_produce_packet(), where c->sys is made sure to be set.
2016-03-20 14:25:16 +01:00
Michael Niedermayer
0ffa9e6eba avformat/utils: Do not wait for more than 1 frame on attachments
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-19 22:58:34 +01:00
Michael Niedermayer
92dfeb5c31 avformat/wtvdec: Set AVFMTCTX_NOHEADER
Needed for noStreams.wtv unless something else forces continued parsing (like looking for more than 1
frame in attachments)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-19 22:58:34 +01:00
Michael Niedermayer
efa98cdc2f avformat/file: Add crypto to default whitelist
Fixes Ticket5287

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-19 18:56:59 +01:00
Clément Bœsch
7af3f27008 lavf/srtdec: do not be strict wrt timing digit lengths
Fixes a sample with 3-length digits for the seconds reported by wm4.
2016-03-18 16:42:07 +01:00
Mats Peterson
d8a1633ee4 lavf/avidec: Add blurb regarding the skipping of xxpc entries in the index
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-18 13:47:43 +01:00
Michael Niedermayer
7660c135a3 avformat/segment: Fix "occured" typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-17 16:50:15 +01:00
Michael Niedermayer
6b7ce0ea0d avformat/avio: Fix unknown protocol handling
Fixes regression since bb8cc89b29

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-17 02:09:39 +01:00
Hendrik Leppkes
c43d485811 matroskaenc: set the actual PCM bitdepth in the header
The actual bitdepth can be different to the storage format (ie. sample format).
Fixes the stored bitdepth for 24-bit formats like FLAC.
2016-03-16 12:52:35 +01:00
Hendrik Leppkes
eae2d89bf7 hls: handle crypto in the protocol checks
Fixes issue 5248
2016-03-16 10:31:41 +01:00
Hendrik Leppkes
0d4b8a2c16 hls: read protocol options through the AVIOContext
This reverts commit 9f9ed79d4c.

The hlsopts member was never set anywhere and always NULL, furthermore
the HLS demuxer needs to retrieve the proper options from the underlying
http protocol (cookies, user-agent, etc), so a dummy context won't help.

Instead, use the AVIOContext directly to access the options.
2016-03-16 10:31:36 +01:00
Stefano Sabatini
7725210e71 lavf/segment: change type of increment_tc to BOOL 2016-03-15 17:50:00 +01:00
Martin Vignali
69638517d1 lavf/segment: add increment_tc option
For example you can split a file, keeping a continuous timecode between
each segment:
ffmpeg -i src.mov -timecode 10:00:00:00 -vcodec copy -f segment \
-segment_time 2 -reset_timestamps 1 -increment_tc 1 target_%03d.mov

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2016-03-15 17:44:13 +01:00