Commit Graph

15613 Commits

Author SHA1 Message Date
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