Commit Graph

15783 Commits

Author SHA1 Message Date
Diego Biurrun
4c8bd8ddb0 os_support: Adjust an outdated #endif comment 2014-08-26 06:34:41 -07:00
Michael Niedermayer
46ad2c4aed avformat/utils: remove assert that tests the same condition as the if() directly above
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-26 15:23:23 +02:00
Michael Niedermayer
bf16872fec avformat/nsvdec: fix out-commented asserts so the function names exist
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-26 15:21:25 +02:00
Michael Niedermayer
cf0e8e7ad4 Merge commit '4e9e6fa99f3ff83cedbf6c378d62065ae419a3b9'
* commit '4e9e6fa99f3ff83cedbf6c378d62065ae419a3b9':
  mpeg: Write H264 streams at offset 2

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-26 14:05:07 +02:00
Luca Barbato
4e9e6fa99f mpeg: Write H264 streams at offset 2
It hints that the content is H264 according to HD-DVD.
2014-08-26 03:43:13 +02:00
ThomasVolkert
96b2ba68c4 avformat/rtpdec: support for HEVC/H.265 RTP payload format (draft v6) depacketizing 2014-08-26 02:18:08 +02:00
Alexander Strasser
db85d11d9d libavformat/ftp: Do not leak memory in routine ftp_features
Setting the pointer to NULL inside both ftp_send_command
and ftp_features is redundant. Generally always setting to
NULL in ftp_send_command seems safer, but throughout the file
that parameter was always passed initialized. So I do it here
too for consistency.

Should fix CID1231988 (RESOURCE_LEAK)

OKed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2014-08-26 00:52:29 +02:00
Vignesh Venkatasubramanian
080acf7771 lavf/matroskadec: Ensure cues_end is initialized
Ensure that cues_start and cues_end are always initialized and
the webm_dash_manifest_cues function returns appropriate error if
they are not computed correctly.

This fixes coverity defect CID1231991.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-25 18:25:39 +02:00
Michael Niedermayer
08a110ca87 Merge commit '6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f'
* commit '6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f':
  libavformat: use MSG_NOSIGNAL when applicable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-25 13:27:21 +02:00
Michael Niedermayer
215db2935b Merge commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d'
* commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d':
  lavf: add AVFormatContext.max_ts_probe

Conflicts:
	doc/APIchanges
	libavformat/avformat.h
	libavformat/utils.c
	libavformat/version.h

lavf-fate/mp3 changes as the estimated input bitrate changes and that is
copied to the output

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-25 13:25:09 +02:00
Rémi Denis-Courmont
6ee1cb5740 libavformat: use MSG_NOSIGNAL when applicable
If the remote end of a connection oriented socket hangs up, generating
an EPIPE error is preferable over an unhandled SIGPIPE signal.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-25 10:49:14 +03:00
Anton Khirnov
b263f8ffe7 lavf: add AVFormatContext.max_ts_probe
It allows to configure how long will avformat_find_stream_info() wait
to get the first timestamp.
2014-08-25 05:17:54 +00:00
Michael Niedermayer
c2c4cee866 avformat/matroskaenc: Check alpha_mode
Fixes CID1231992

Suggested-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-24 20:33:17 +02:00
Paul B Mahol
6dfa70f272 Correct few "ffmpeg" typos
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-08-24 11:05:42 +00:00
Michael Niedermayer
1aa153d644 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  fate: Fix ffprobe tests with --target-path set.
  doc/ffmpeg: Try to clarify that the input option -r is not the same as -framerate.
  Do not print a useless error number if mov header reading fails.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-24 03:58:14 +02:00
ThomasVolkert
50a4d5cfc6 Add support for H.261 RTP payload format (RFC 4587) 2014-08-24 03:53:30 +02:00
Carl Eugen Hoyos
0744daa887 Do not print a useless error number if mov header reading fails.
The error string is printed by ffmpeg as for other demuxers.
2014-08-24 02:45:58 +02:00
Michael Niedermayer
9bff8cfc91 Merge commit 'f9f34cb9983ec6f4ef119c34b726d3b39c143110'
* commit 'f9f34cb9983ec6f4ef119c34b726d3b39c143110':
  ogg: Use separate classes for the aliases

Conflicts:
	libavformat/oggenc.c

See: 2ccc6ff03a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-23 21:42:13 +02:00
Luca Barbato
f9f34cb998 ogg: Use separate classes for the aliases
Unbreak 051aadeed1
2014-08-23 02:42:18 +02:00
Michael Niedermayer
300d489ac9 Merge commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd'
* commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd':
  ogg: Provide aliases for Speex, Opus and audio-only ogg

Conflicts:
	Changelog
	libavformat/oggenc.c
	libavformat/version.h

See: 2ccc6ff03a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22 21:41:00 +02:00
Michael Niedermayer
3e07a056a8 Merge commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421'
* commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421':
  electronicarts: set the framerate for TGQ/TQI

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22 21:00:06 +02:00
Michael Niedermayer
ce1059d5c9 Merge commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136'
* commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136':
  electronicarts: read the framerate for MAD

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22 20:50:16 +02:00
Michael Niedermayer
350dd85345 Merge commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b'
* commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b':
  electronicarts: do not fail on zero-sized chunks

Conflicts:
	libavformat/electronicarts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22 19:01:26 +02:00
Diego Biurrun
1019b7c4ed os_support: Undefine lseek/stat/fstat before defining them
This avoids a number of redefinition warnings on MinGW64.
2014-08-22 18:35:19 +02:00
Luca Barbato
051aadeed1 ogg: Provide aliases for Speex, Opus and audio-only ogg
Since they are aliases for ogg enabling any of them enables ogg as well.
2014-08-22 13:23:50 +02:00
Anton Khirnov
cb7b1a2dfb electronicarts: set the framerate for TGQ/TQI
It is hardcoded to 15fps.
2014-08-22 11:15:20 +00:00
Anton Khirnov
7b6aae23e1 electronicarts: read the framerate for MAD 2014-08-22 11:15:20 +00:00
Anton Khirnov
4d6c515284 electronicarts: do not fail on zero-sized chunks
At least one FATE sample contains such chunks and happens to work simply
by accident (due to find_stream_info() swallowing the error).

CC: libav-stable@libav.org
2014-08-22 11:15:20 +00:00
Michael Niedermayer
fca76dc61e Merge commit '13c90bc9a359e969cc2b7f7e8199b02a0e4c6ec9'
* commit '13c90bc9a359e969cc2b7f7e8199b02a0e4c6ec9':
  adts: Return more meaningful error codes

Conflicts:
	libavformat/adtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-21 21:56:33 +02:00
Michael Niedermayer
a9f3bb14ba avformat/mov: use 64bit for size in mov_skip_multiple_stsd()
Fixes integer overflow
Fixes Ticket 3866

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-21 17:49:37 +02:00
Nidhi Makhijani
13c90bc9a3 adts: Return more meaningful error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-21 04:25:48 -07:00
Michael Niedermayer
2076095549 avformat/asfdec: Check av_new_packet()s return code
Fixes CID1041093

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-20 18:32:59 +02:00
Michael Niedermayer
05dd5368a9 avformat/nutdec: always initialize event_flags
Fixes: CID1231990

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-20 16:45:08 +02:00
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>
2014-08-19 20:18:01 +02:00
Michael Niedermayer
b07dc81a9e Merge commit '86dfcfd0e30d6645eea2c63c1c60a0550e7c97ea'
* commit '86dfcfd0e30d6645eea2c63c1c60a0550e7c97ea':
  mov: Drop unused parameter from ff_mov_read_esds()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-19 18:27:51 +02:00
Diego Biurrun
86dfcfd0e3 mov: Drop unused parameter from ff_mov_read_esds()
This is cleaner and avoids an uninitialized variable warning with MSVC.
2014-08-19 06:22:07 -07:00
Ben Hagen
c9a5497a0b avformat/cinedec: allow number zero in metadata 2014-08-19 11:23:49 +02:00
Andrey Myznikov
79593096c4 avformat/a64: Avoid segfault in a64_write_header() when stream codec is not open
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-18 19:48:18 +02:00
Paul B Mahol
b6543421f5 avformat/iff: rudimentary support for animations
For now only first frame is decoded.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-08-18 13:51:52 +00:00
Paul B Mahol
3dca5a5c41 wvdec: check for eof in wv_read_block_header()
Fixes Ticket #3865
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-08-18 11:30:35 +00:00
Paul B Mahol
90b2f31367 cafdec: check for eof in read_info_chunk()
Fixes Ticket #3864
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-08-18 10:32:57 +00:00
James Almer
853c1fb668 lavf/wavdec: add sanity check for AVCodecContext.channels
Fixes ticket #3862.
As a side effect, this also fixes aac_latm in wav.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-18 09:29:25 +02:00
Mark Reid
882fb53cb7 avformat/mxf: added ULs for demuxing avid media composer mxf files
The AAF SDK refers to these ULs as Legacy. These ULs are the same as the
ones found in FFmbc's version of mxf.c and the ones found in libMXF
Fixes Ticket#1554, Ticket#3100 and Ticket#3450
2014-08-18 02:36:32 +02:00
Michael Niedermayer
00aa2ebb1c Merge commit '369380e1c4c6fc9b0d9ff04ec23d46b252ba7110'
* commit '369380e1c4c6fc9b0d9ff04ec23d46b252ba7110':
  mxf: Support AAC

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-17 23:06:38 +02:00
Michael Niedermayer
887d85fdcc Merge commit '747cd9560c2248ff2834f29cd2190646330e4676'
* commit '747cd9560c2248ff2834f29cd2190646330e4676':
  mxf: Add the UL for the MPEG2VideoDescriptor

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-17 22:00:50 +02:00
Michael Niedermayer
ecb7f1dd52 Merge commit '304089aca7d238ae184e09993b5c737aa22e2c2c'
* commit '304089aca7d238ae184e09993b5c737aa22e2c2c':
  mxf: Add UID print helpers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-17 21:50:06 +02:00
Nicolas George
4bebce0617 lavf/http: remove special case for cookies attributes.
With the previous change, unknown attributes are all ignored,
as specified by the RFC.
2014-08-17 20:07:27 +02:00
Nicolas George
481cbc5ad5 lavf/http: fix cookie parsing.
The current code would use any unknown attribute-value pair
as the cookie value.
RFC 6265 states that the first key-value pair is the actual
cookie, and the attribute-value pairs only start after.

With the current code:
Set-Cookie: test=good_value; path=/; dummy=42
gives this:
Cookie: dummy=42
instead of this with the new code:
Cookie: test=good_value
2014-08-17 20:07:27 +02:00
Luca Barbato
369380e1c4 mxf: Support AAC
Update mxf_set_audio_pts to use the container-provided information.

The UL is marked as "to be changed in the future", but the current
samples in the wild do use it.
2014-08-17 16:11:16 +02:00
Luca Barbato
747cd9560c mxf: Add the UL for the MPEG2VideoDescriptor 2014-08-17 16:11:02 +02:00
Luca Barbato
304089aca7 mxf: Add UID print helpers
And use it to print non-parsed ULs.
2014-08-17 16:11:02 +02:00
Michael Niedermayer
cabcd8ff66 avformat/movenchint: use av_freep() for safety
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-17 13:27:20 +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
Michael Niedermayer
3574d34aca Merge remote-tracking branch 'cus/stable'
* cus/stable:
  mpegts: always parse pcr

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-16 20:00:26 +02:00
Ben Hagen
6928ea7eb0 cinedec: add shutter and crop metadata 2014-08-16 19:14:49 +02:00
Michael Niedermayer
74c81106d2 avformat/udp: remove unneeded variable initialization
Found-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-16 15:58:40 +02:00
Michael Niedermayer
7916053ced avformat/udp: dont mix integers with pointers
Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-16 15:58:40 +02:00
Reimar Döffinger
a0941c8a2b Use new av_dict_set_int helper function.
Get rid of the many, slightly differing, implementations
of basically the same thing.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-16 14:31:41 +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
82e0cb360a avformat/thp: dont mix integers with pointers
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-16 12:04:45 +02:00
Michael Niedermayer
81a663f49e Drop remaining unneeded != NULL
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 22:47:45 +02:00
Michael Niedermayer
60dbed6067 Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'
* commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867':
  cosmetics: Write NULL pointer inequality checks more compactly

Conflicts:
	libavcodec/dvdsubdec.c
	libavcodec/h263dec.c
	libavcodec/libxvid.c
	libavcodec/rv10.c
	libavcodec/utils.c
	libavformat/format.c
	libavformat/matroskadec.c
	libavformat/segment.c
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:26:12 +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
Michael Niedermayer
9c712d0b16 vformat/utils: call flush_packet_queue() from avformat_free_context()
This avoids some theoretical memleaks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 19:48:28 +02:00
Andrey Myznikov
609d5db803 Fix packet_buffer memory leak in avformat_free_context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 19:20:12 +02:00
Gabriel Dume
4b1f5e5090 cosmetics: Write NULL pointer inequality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 05:34:13 -07: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
Michael Niedermayer
1e81b185ae Merge commit '7ccb847f0f1f28199fa254847b91b6e50fb92832'
* commit '7ccb847f0f1f28199fa254847b91b6e50fb92832':
  http: Reduce scope of a variable in parse_content_encoding()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 12:12:35 +02:00
Diego Biurrun
7ccb847f0f http: Reduce scope of a variable in parse_content_encoding()
Also fixes an unused variable warning with zlib disabled.
2014-08-15 09:37:38 +02:00
Michael Niedermayer
fce8817a01 avformat/format: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 20:40:11 +02:00
Michael Niedermayer
8d403d9c89 Merge commit '0528226a05cc08b74197547fba0b1939bf68990d'
* commit '0528226a05cc08b74197547fba0b1939bf68990d':
  a64: Return correct error code on invalid data stream

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 12:42:59 +02:00
Nidhi Makhijani
0528226a05 a64: Return correct error code on invalid data stream
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-14 01:22:47 -07:00
James Almer
dffbac0956 lavf/oggparsevp8: use ff_vorbis_stream_comment()
commit db68ef89 did not update the vp8 parser

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 05:47:06 +02:00
Anton Khirnov
d92550d191 lavf: eliminate ff_get_audio_frame_size()
It is basically a wrapper around av_get_audio_frame_duration(), with a
fallback to AVCodecContext.frame_size. However, that field is set only
when the stream codec context is actually used for encoding or decoding,
which is discouraged.

For muxing, it is generally the responsibility of the caller to set the
packet duration.
For demuxing, if the duration is not stored at the container level, it
should be set by the parser.

Therefore, removing the frame_size fallback should not break any
important case.
(cherry picked from commit 30e50c5027)

Conflicts:

	libavformat/utils.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 03:12:58 +02:00
Michael Niedermayer
7b59217b60 Move WMA case from ff_get_audio_frame_size() to av_get_audio_frame_duration()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 03:03:56 +02:00
Michael Niedermayer
ed488d1535 Move frame_size fallback from ff_get_audio_frame_size() to av_get_audio_frame_duration()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 03:00:39 +02:00
Michael Niedermayer
986ec3417a avformat/utils: Remove demuxer specific frame_size fallback from ff_get_audio_frame_size()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 02:39:59 +02:00
Michael Niedermayer
1d7544b752 Merge commit 'e8049af1325dd59a51546c15b2e71a0f578e9d27'
* commit 'e8049af1325dd59a51546c15b2e71a0f578e9d27':
  mpegts: Do not try to write a PMT larger than SECTION_SIZE

Conflicts:
	libavformat/mpegtsenc.c

See: 842b6c14bc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 02:13:46 +02:00
Michael Niedermayer
b8e4c11d93 Merge commit '481a3667495425db9fdffb653292b6460fb68208'
* commit '481a3667495425db9fdffb653292b6460fb68208':
  cmdutils: allow matching by metadata in stream specifiers

Conflicts:
	Changelog
	cmdutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 00:41:21 +02:00
Michael Niedermayer
e260c8180e Merge commit '4e629ef80e62a54636cb46033998177dd08cf3ad'
* commit '4e629ef80e62a54636cb46033998177dd08cf3ad':
  http: Fix authentication, broken since 6a463e7fb

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 00:12:56 +02:00
Michael Niedermayer
a8db787932 Merge commit 'db68ef898a3802e51b6f41fd600d0d46d058e3f8'
* commit 'db68ef898a3802e51b6f41fd600d0d46d058e3f8':
  ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.

Conflicts:
	libavformat/oggparsevorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-14 00:05:49 +02:00
Michael Niedermayer
a90364d001 Merge commit 'cc3e88a2b9e7ecf62e4ea1c41ce1623cea67ee96'
* commit 'cc3e88a2b9e7ecf62e4ea1c41ce1623cea67ee96':
  mov: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:51:03 +02:00
Michael Niedermayer
1110a030c7 Merge commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa'
* commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa':
  nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:44:53 +02:00
Michael Niedermayer
314c198413 Merge commit '0f789322efa78a672e4c3027e5cc12b8a947043a'
* commit '0f789322efa78a672e4c3027e5cc12b8a947043a':
  flvdec: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:36:30 +02:00
Michael Niedermayer
9f97f7c546 Merge commit '93c04e095dc37ebdab22174e88cfa91e24940866'
* commit '93c04e095dc37ebdab22174e88cfa91e24940866':
  Expose metadata found in onCuePoint events in .flv files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:14:23 +02:00
Michael Niedermayer
f01a1281ee Merge commit '019d3fccc4dcf5c8379112f697ce9eb08edee9b9'
* commit '019d3fccc4dcf5c8379112f697ce9eb08edee9b9':
  Set protocol-level metadata in AVFormatContext any time a packet is read.

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:02:56 +02:00
Michael Niedermayer
313d75cd43 Merge commit '7e38903b5c86a759549e70647ae42bb22d353b14'
* commit '7e38903b5c86a759549e70647ae42bb22d353b14':
  http: enable icy metadata by default.

Conflicts:
	Changelog
	libavformat/http.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 22:54:31 +02:00
Michael Niedermayer
69a5cd9fea Merge commit '7601f9412a2d3387617a45966b65b452a632c27a'
* commit '7601f9412a2d3387617a45966b65b452a632c27a':
  http: export icecast metadata as an option with name "metadata".

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 22:52:53 +02:00
Michael Niedermayer
ed8e6d535c Merge commit 'afbd4b7e093adf6d7a830b32759ca3ba8500363d'
* commit 'afbd4b7e093adf6d7a830b32759ca3ba8500363d':
  lavf: add AVFormatContext/AVStream fields for signaling to the user when events happen.

Conflicts:
	libavformat/avformat.h
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 22:22:52 +02:00
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>
2014-08-13 12:43:26 -07:00
Anton Khirnov
30e50c5027 lavf: eliminate ff_get_audio_frame_size()
It is basically a wrapper around av_get_audio_frame_duration(), with a
fallback to AVCodecContext.frame_size. However, that field is set only
when the stream codec context is actually used for encoding or decoding,
which is discouraged.

For muxing, it is generally the responsibility of the caller to set the
packet duration.
For demuxing, if the duration is not stored at the container level, it
should be set by the parser.

Therefore, removing the frame_size fallback should not break any
important case.
2014-08-13 17:41:11 +00:00
Martin Storsjö
4e629ef80e http: Fix authentication, broken since 6a463e7fb
The cur_*auth_type variables were set before the http_connect call
prior to 6a463e7fb - their sole purpose is to record the
authentication type used to do the latest request, since parsing
the http response sets the new type in the auth state.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-13 20:22:28 +03:00
Michael Niedermayer
9f7a2ecb29 Merge commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f'
* commit '8bf3bf69ad7333bf0c45f4d2797fc2c61bc8922f':
  http: Stop reading after receiving the whole file for non-chunked transfers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 18:26:40 +02:00
Andrew Stone
db68ef898a ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
Originally, AVFormatContext and a metadata dict were provided to ff_vorbis_comment(),
but this presented issues if an AVStream was being updated or the metadata on
AVFormatContext wasn't actually being updated. To remedy this, ff_vorbis_stream_comment()
explicitly updates a stream's metadata and sets any necessary flags.

ff_vorbis_comment() does not modify any flags, and any calls to it that update
AVFormatContext's metadata (just a single call) must also update
AVFormatContext.event_flags after detecting any metadata changes to the provided
dictionary, as signaled by a positive return value.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:25:19 +00:00
Andrew Stone
cc3e88a2b9 mov: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:24:09 +00:00
Andrew Stone
fa3a5dd4de nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:23:36 +00:00
Andrew Stone
0f789322ef flvdec: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:23:28 +00:00
Andrew Stone
93c04e095d Expose metadata found in onCuePoint events in .flv files.
Currently, only onMetaData is used, but some providers (wrongly)
put metadata into onCuePoint events, and it's still nice to be
able to use that data.

onCuePoint events also present metadata slightly differently than
onMetaData events: all metadata is found inside an object called
"parameters". In order to extract this metadata, it's easiest to
recurse through the object tree and pull out anything found in
child objects and put it in the top-level metadata.

Reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/2/help.html?content=00001404.html

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:11:43 +00:00
Andrew Stone
019d3fccc4 Set protocol-level metadata in AVFormatContext any time a packet is read.
If any option named "metadata" is set inside the context, it is pulled up to
the context and then the option is cleared.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:10:49 +00:00
Andrew Stone
7e38903b5c http: enable icy metadata by default.
It won't hurt servers that don't care about the header,
and those that do will include it by default.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:10:15 +00:00
Andrew Stone
7601f9412a http: export icecast metadata as an option with name "metadata".
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:09:05 +00:00
Andrew Stone
afbd4b7e09 lavf: add AVFormatContext/AVStream fields for signaling to the user when events happen.
The only flags, for now, indicate if metadata was updated and are set after each call to
av_read_frame(). This comes with the caveat that, on stream start, it might not be set properly
as packets might be buffered in AVFormatContext.packet_buffer before being given to the user
in av_read_frame().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:04:48 +00:00
Martin Storsjö
8bf3bf69ad http: Stop reading after receiving the whole file for non-chunked transfers
Previously this logic was only used if the server didn't
respond with Connection: close, but use it even for that case,
if the server response is non-chunked.

Originally the http code has relied on Connection: close to close
the socket when the file/stream is received - the http protocol
code just kept reading from the socket until the socket was closed.
In f240ed18 we added a check for the file size, because some
http servers didn't respond with Connection: close (and wouldn't
close the socket) even though we requested it, which meant that the
http protocol blocked for a long time at the end of files, waiting
for a socket level timeout.

When reading over tls, trying to read at the end of the connection,
when the peer has closed the connection, can produce spurious (but
harmless) warnings. Therefore always voluntarily stop reading when
the specified file size has been received, if not using a chunked
transfer encoding. (For chunked transfers, we already return 0
as soon as we get the chunk header indicating end of stream.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-13 14:34:25 +03:00
Carl Eugen Hoyos
99867fc0c4 Fix warning if https protocol was requested but isn't available. 2014-08-12 10:03:36 +02:00
Carl Eugen Hoyos
fddea3f074 Check for hevc startcode when muxing into mpeg-ts. 2014-08-12 08:48:20 +02:00
Reimar Döffinger
2c0454cd20 Add missing initialization for AVProbeData.
This has become necessary since the new mime field was added.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-11 21:10:22 +02:00
James Almer
7b3de03c8f lavf: stop exporting internal functions
Except for those currently used by ffserver.

Signed-off-by: James Almer <jamrial@gmail.com>

Also left some others that seemed used by applications other than ffserver

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-11 14:29:56 +02: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
Michael Niedermayer
49456a95eb avformat/movenc: Fix printf type
Found-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-11 00:09:09 +02:00
Mark Reid
cab39afb1a avformat/movenc: check that reel_name length doesn't exceed UINT16_MAX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 21:32:05 +02:00
Michael Niedermayer
d123d9abef Merge commit '8dca0877e3e1457e9ec79ffa1ead1135aabb791c'
* commit '8dca0877e3e1457e9ec79ffa1ead1135aabb791c':
  mpegts: Return proper error code on invalid input data

Conflicts:
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 20:34:28 +02:00
Carl Eugen Hoyos
273fc0139e lavf/img2dec: Initialize a stack variable.
Fixes a valgrind warning about using unitialised memory.
Hopefully fixes crashes on several platforms reported through fate.
2014-08-10 18:20:12 +02:00
Nidhi Makhijani
8dca0877e3 mpegts: Return proper error code on invalid input data
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-10 07:24:30 -07:00
Michael Niedermayer
e18d9d90f1 Merge commit '8c6f430291374cf6d2cfb85cdbb809803b5a7d83'
* commit '8c6f430291374cf6d2cfb85cdbb809803b5a7d83':
  mpeg: Suppress a compiler warning on callback type

Conflicts:
	libavformat/mpegenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 02:20:54 +02:00
Michael Niedermayer
329832d779 Merge commit '24c788f4878729a42150581d7ed7e9a11daf874d'
* commit '24c788f4878729a42150581d7ed7e9a11daf874d':
  Remove obsolete FF_API_REFERENCE_DTS cruft.

Conflicts:
	libavformat/avformat.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 02:01:34 +02:00
Michael Niedermayer
c218d8218d Merge commit '24e87f7f425a52b1e69661dcb2fbe0555a76f30b'
* commit '24e87f7f425a52b1e69661dcb2fbe0555a76f30b':
  Remove obsolete FF_API_PROBE_MIME cruft.

Conflicts:
	libavformat/avformat.h
	libavformat/format.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 01:36:21 +02:00
Michael Niedermayer
0f7ca2d778 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavf/avio: do not include bprint.h.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 01:34:05 +02:00
Michael Niedermayer
a57ece0cb4 Merge commit '1985c2e75c607ac51bfd8dc87d2957a5edf2b6f8'
* commit '1985c2e75c607ac51bfd8dc87d2957a5edf2b6f8':
  Bump major versions of all libraries.

Conflicts:
	doc/APIchanges
	libavcodec/version.h
	libavdevice/version.h
	libavfilter/version.h
	libavformat/version.h
	libavutil/version.h
	libswscale/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 00:26:45 +02:00
Michael Niedermayer
3e41d2e612 Merge commit 'f4c444e17d137c786f0ed2da0e5943df505d5f9e'
* commit 'f4c444e17d137c786f0ed2da0e5943df505d5f9e':
  Postpone API-incompatible changes until the next bump.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-09 22:19:45 +02:00
Luca Barbato
8c6f430291 mpeg: Suppress a compiler warning on callback type 2014-08-09 21:39:36 +02:00
Anton Khirnov
24c788f487 Remove obsolete FF_API_REFERENCE_DTS cruft. 2014-08-09 16:59:26 +00:00
Anton Khirnov
24e87f7f42 Remove obsolete FF_API_PROBE_MIME cruft. 2014-08-09 16:59:21 +00:00
Anton Khirnov
1985c2e75c Bump major versions of all libraries. 2014-08-09 16:58:33 +00:00
Anton Khirnov
f4c444e17d Postpone API-incompatible changes until the next bump. 2014-08-09 16:57:10 +00:00
Nicolas George
f87db44685 lavf/avio: do not include bprint.h.
See f75786f and 04bc370.
2014-08-09 15:51:04 +02:00
Michael Niedermayer
f75786f3bc avformat/avio: Fix "warning: struct AVBPrint declared inside parameter list"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-09 15:30:03 +02:00
Michael Niedermayer
64d029de41 avformat/matroskaenc: fix MAX_CUEPOINT_SIZE calculation
Fixes assertion failure
Fixes Ticket3822

as a side-effect this makes some mkv files a few bytes smaller

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-09 05:05:09 +02:00
Mark Reid
d6af706eee avformat/movenc: write reel_name metadata to tmcd atom
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-09 03:08:25 +02:00
Carl Eugen Hoyos
4b63bcef90 Autodetect jpeg-ls files. 2014-08-08 22:43:15 +02:00
Michael Niedermayer
a698efbc9d Merge commit 'e4c9e59a4547adaaa0ce9f25b0d0c5b91ae15472'
* commit 'e4c9e59a4547adaaa0ce9f25b0d0c5b91ae15472':
  mpeg: K&R formatting cosmetics

Conflicts:
	libavformat/mpegenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 21:31:54 +02:00
Justin Jacobs
87dc8b3af9 avformat/matroskadec: Check avpriv_new_chapter() for failure
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 21:16:30 +02:00
Marek Fort
d1e750cd51 avformat/mov: Support reading Avid's metadata for DNXHD codec.
The AALP atom is necessary to properly decode the alpha channel.
Needed for ticket #3707

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 18:39:04 +02:00
Carl Eugen Hoyos
f73d75384f Autodetect webp files. 2014-08-08 16:14:18 +02:00
Luca Barbato
e4c9e59a45 mpeg: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-08 05:22:09 -07:00
Diego Biurrun
454697603e mpegts: Use av_free() to free memory allocated by av_strdup() 2014-08-08 03:12:57 -07: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
James Almer
5c3c67126f lavf/avio: rename url_feof() to avio_feof()
It's a public function and should use the avio_ namespace

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 00:48:22 +02:00
Mark Reid
f1e626a357 avformat/mov: read reel_name metadata from tmcd atom
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 23:37:55 +02:00
Michael Niedermayer
92a28e9f56 avformat/mpegtsenc: Use av_freep() for pids
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 23:04:32 +02:00
Michael Niedermayer
31eaecfee9 avformat/mpegtsenc: Free services array completely on failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 23:04:23 +02:00
Michael Niedermayer
12b59e57f3 avformat/mpegtsenc: Use correct deallocation code on failure of pids array allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 23:02:10 +02:00
Michael Niedermayer
5f8300afc6 mpegtsenc: Check dynarray_add() for failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 23:02:10 +02:00
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>
2014-08-07 23:01:51 +02:00
Michael Niedermayer
efcf1fcad3 Merge commit '5b220e1e19c17b202d83d9be0868d152109ae8f0'
* commit '5b220e1e19c17b202d83d9be0868d152109ae8f0':
  mpegts: Fix memory leaks and related crashes in mpegs_write_header()

Conflicts:
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 22:11:37 +02:00
Michael Niedermayer
3224a319c0 Merge commit 'f8ab9f2fe3730a0e8c3c1eb7c486f7c0041fb3fc'
* commit 'f8ab9f2fe3730a0e8c3c1eb7c486f7c0041fb3fc':
  mpegts: Avoid unnecessary variable shadowing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 22:06:06 +02:00
Michael Niedermayer
066d776501 Merge commit '6d6bd3a3db24747ae5e10716f4782129c38951f6'
* commit '6d6bd3a3db24747ae5e10716f4782129c38951f6':
  mpegts: Drop some unnecessary parentheses

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 21:42:34 +02:00
Michael Niedermayer
ec0b08d20b Merge commit 'b7b1bf9166ac3102c401295fdd5d4933c512aa50'
* commit 'b7b1bf9166ac3102c401295fdd5d4933c512aa50':
  mpegts: K&R formatting cosmetics

Conflicts:
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 21:16:06 +02:00
Marek Fort
4e70104aba avformat/movenc: XMP metadata support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 20:11:09 +02:00
Marek Fort
054c506e3d avformat/mov: XMP metadata suppor.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 20:11:09 +02:00
Diego Biurrun
5b220e1e19 mpegts: Fix memory leaks and related crashes in mpegs_write_header() 2014-08-07 07:52:17 -07:00