1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-02 14:33:23 +02:00
Commit Graph

15575 Commits

Author SHA1 Message Date
Anton Khirnov
b8604a9761 oggparsecelt: do not set AVCodecContext.frame_size
It is supposed to be set by decoders only.
2014-07-09 13:38:14 +00:00
Anton Khirnov
d5cf5afabb adxdec: get rid of an avpriv function
The only thing the demuxer needs is the sample rate to set the timebase,
which can be simply read with AV_RB32.
2014-07-09 13:37:18 +00:00
Anton Khirnov
f6ee61fb05 lavc: export DV profile API used by muxer/demuxer as public 2014-07-09 13:35:07 +00:00
Anton Khirnov
c9c1265c52 avformat: update muxing doxy
The callers should now set the stream timebase, not the codec one.
2014-07-09 13:30:22 +00:00
Anton Khirnov
abda15a990 cdg: set the keyframe flag on the first packet
Bug-Id: 55
2014-07-09 13:30:11 +00:00
Mark Boorer
352756ecae avformat/movenc: respect color_range when encoding dnxhd.
Set the ACLR atom appropriately for legal / full range.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 00:35:23 +02:00
Michael Niedermayer
7125b6ca90 avformat/segment: remove gettimeofday() use, remove sys/time.h
It causes portability issues, and would need ifdef hell if its kept

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 22:52:39 +02: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
Michael Niedermayer
fd3388d63d Merge commit '18fb38fb9ea7e2d5997c096fccfcd4cb43f70294'
* commit '18fb38fb9ea7e2d5997c096fccfcd4cb43f70294':
  mov: Remove a variable that is set but never used

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 21:53:09 +02:00
Michael Niedermayer
a26ecba075 Merge commit '52a1c32c0a86e84d43f977c5148e62975a0c6917'
* commit '52a1c32c0a86e84d43f977c5148e62975a0c6917':
  nut: Use nut->version in the version range check

Conflicts:
	libavformat/nutdec.c

Note, this bug did not affect ffmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 21:18:36 +02:00
Martin Storsjö
18fb38fb9e mov: Remove a variable that is set but never used
This silences a warning with gcc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-07-08 21:14:43 +03:00
Luca Barbato
52a1c32c0a nut: Use nut->version in the version range check
It was wrongly left unchanged when the version field had been
introduced. (c94e2e85cb)
2014-07-08 19:04:09 +02:00
Michael Niedermayer
a981d1b6aa avformat/nutdec: if all else fails try to lookup video tag in isom
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 16:37:06 +02:00
Michael Niedermayer
5a4edf6f0d avformat/movenc: check that the video resolution is supported
Resolutions are stored as 16bit integers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 16:17:44 +02:00
Roman Savchenko
3d90f27ad5 avformat_new_stream: make the AVCodec parameter const
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-07-08 08:24:27 +00:00
Michael Niedermayer
b8d017adba avformat/segment: simplify localtime* use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 22:57:36 +02:00
Deti fliegl
8cda23f341 avformat/segment: Support cutting at clocktime
Signed-off-by: Deti fliegl <fliegl@baycom.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-07 22:56:55 +02:00
Michael Niedermayer
a863c97e99 smoothstreamingenc: Fix a memory leak on errors
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-07-07 22:08:42 +03:00
Michael Niedermayer
d95a04547a Merge commit '77fc7b76726719746ca45df6c4a62c41abad506e'
* commit '77fc7b76726719746ca45df6c4a62c41abad506e':
  vc1test: Return proper error codes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-06 19:25:12 +02:00
Michael Niedermayer
1c8c4b8a89 Merge commit '865461099e062de5a3a109c2a5be98004c11d8bd'
* commit '865461099e062de5a3a109c2a5be98004c11d8bd':
  librtmp: Don't free the temp url at the end of rtmp_open

Conflicts:
	libavformat/librtmp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-06 19:12:52 +02:00
Nidhi Makhijani
02a7a5e330 vc1test: Check malloc call
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-06 09:25:52 -07:00
Nidhi Makhijani
77fc7b7672 vc1test: Return proper error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-06 07:53:58 -07:00
Martin Storsjö
865461099e librtmp: Don't free the temp url at the end of rtmp_open
librtmp can keep pointers to this string internally, and may
use them at shutdown as well.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-07-06 17:49:02 +03:00
Michael Niedermayer
a53c5d454e avformat/smoothstreamingenc: fix memleak
Fixes CID1224285
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-06 05:02:38 +02:00
Carl Eugen Hoyos
d919fdd4f7 Do not detect jp2 images as mov files. 2014-07-05 02:11:17 +02:00
Lukasz Marek
b7adc5b5a6 lavf/libssh: call ssh_userauth_none before ssh_userauth_list
According to doc, ssh_userauth_none must be called before ssh_userauth_list.
It solves login issue for new versions of libssh.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 20:30:48 +02:00
Michael Niedermayer
d1a8659efe avformat/img2dec: remove functions from image pipe which are unneeded for image pipes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 16:44:40 +02:00
Michael Niedermayer
c277ab6b78 avformat/img2dec: improve bmp probe
fix probetest failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 04:54:52 +02:00
Michael Niedermayer
d36fe733c1 avformat/img2dec: increase probe buffer to 2k
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 04:54:32 +02:00
Michael Niedermayer
0437445926 avformat/img2dec: set AVProbeData size correctly on corner cases of tiny files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 04:00:27 +02:00
Michael Niedermayer
6691eee48c avformat/img2dec: avoid seekback on probeing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 04:00:27 +02:00
Michael Niedermayer
726e253b00 avformat/img2dec: allocate and clear padding area for probe correctly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 04:00:27 +02:00
Michael Niedermayer
7d179b126b Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master:
  lavf/ftp: always treat all response codes >= 500 as error
  lavf/ftp: explicitly enable UTF-8
  lavf/ftp: make response parsing more RFC compliant

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 02:19:07 +02:00
Carl Eugen Hoyos
4c145b692c Autodetect JPEG2000 imagess.
Autodetection of jp2 files does not work yet, the files are detected
as mov.
2014-07-04 02:10:26 +02:00
Lukasz Marek
c82521713d lavf/ftp: always treat all response codes >= 500 as error
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-07-04 01:21:08 +02:00
Lukasz Marek
a0358db323 lavf/ftp: explicitly enable UTF-8
Most FTP servers enable UTF-8 by default, but it is not required by the standard.
Enabling it manually makes ffmpeg implementation more consistent when server
doesn't enable it by default.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-07-04 01:21:08 +02:00
Lukasz Marek
3ba6dce48d lavf/ftp: make response parsing more RFC compliant
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-07-04 01:21:08 +02:00
Michael Niedermayer
b28fcbba0c Merge commit '9279826008b80daad7446950a821f32033ccd33f'
* commit '9279826008b80daad7446950a821f32033ccd33f':
  id3v2enc: use a case-insensitive comparison for APIC picture type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 00:50:40 +02:00
Michael Niedermayer
a9ce5d92e6 Merge commit '0955e57ad07640574fc20ce0bea3c0b83982ada1'
* commit '0955e57ad07640574fc20ce0bea3c0b83982ada1':
  daud: split muxer and demuxer

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 21:42:16 +02:00
Anton Khirnov
9279826008 id3v2enc: use a case-insensitive comparison for APIC picture type 2014-07-03 18:40:37 +00:00
Nidhi Makhijani
0955e57ad0 daud: split muxer and demuxer
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-03 10:46:11 -07:00
Carl Eugen Hoyos
d538dd824e avformat: Add image3 demuxers with format autodetection
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 18:14:06 +02:00
James Zern
dea377fcc0 ivfenc: support VP9
libvpx tools accept vp9 ivf files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 15:46:26 +02:00
Michael Niedermayer
a3c479fc49 avformat/avformat: minor grammar improvement
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 13:51:53 +02:00
Michael Niedermayer
44f079b27e Merge commit 'cdab9db2adeec46b3984309c8c651bdd737d2b6b'
* commit 'cdab9db2adeec46b3984309c8c651bdd737d2b6b':
  lavf: document av_dump_format()

Conflicts:
	libavformat/avformat.h

See: 61f96be08a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 13:39:23 +02:00
Vittorio Giovara
cdab9db2ad lavf: document av_dump_format() 2014-07-02 23:37:21 -04:00
Carl Eugen Hoyos
b02cfad7d2 Fix standalone compilation of the wtv muxer. 2014-07-02 23:41:29 +02:00
Michael Niedermayer
98569d8963 matroskadec: Fix a double negation typo
This typo has existed since this code was added in c16582579.
Newer versions of clang pointed out that this comparison always
was true (since the result of the negation is either 0 or 1, while
AVDISCARD_ALL has the value 48).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-07-02 20:15:42 +03:00
Michael Niedermayer
141ee10913 Merge commit '48e6432407a73d5006d84609456e6e0bc3dd8fc4'
* commit '48e6432407a73d5006d84609456e6e0bc3dd8fc4':
  matroska: Factor out mkv_write_stereo_mode

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 20:55:42 +02:00
Michael Niedermayer
ee78b0c252 Merge commit 'b75a1f9892b5b715397edbf837e4d4cda337907b'
* commit 'b75a1f9892b5b715397edbf837e4d4cda337907b':
  matroska: Factor out write_track from mkv_write_tracks

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 20:25:35 +02:00
Michael Niedermayer
8365287e61 Merge commit 'f1f6156b3fc9eb77b439d031ba18974d80b8341e'
* commit 'f1f6156b3fc9eb77b439d031ba18974d80b8341e':
  matroska: K&R formatting cosmetics

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 19:58:57 +02:00
Luca Barbato
48e6432407 matroska: Factor out mkv_write_stereo_mode 2014-07-01 16:43:20 +02:00
Luca Barbato
b75a1f9892 matroska: Factor out write_track from mkv_write_tracks 2014-07-01 16:43:01 +02:00
Luca Barbato
f1f6156b3f matroska: K&R formatting cosmetics 2014-07-01 16:42:32 +02:00
Michael Niedermayer
fb318def5d Merge commit '20f95f21f9b9595608ba668a6eca78f2d508be67'
* commit '20f95f21f9b9595608ba668a6eca78f2d508be67':
  mov: Support default-base-is-moof.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 16:31:57 +02:00
Yusuke Nakamura
20f95f21f9 mov: Support default-base-is-moof.
default-base-is-moof shall be set to track fragments compatible with DASH
Media Segments. So, this is a fundamental support for ISOBMFF ver. DASH.
This is meaningful only when base-data-offset-present is absent and two or
more track fragments are present in a movie fragment.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-07-01 14:36:06 +03:00
Michael Niedermayer
f054d1e7ae avformat/hdsenc: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-30 05:08:33 +02:00
Michael Niedermayer
ca384d708b avformat/rtsp: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-30 05:08:16 +02:00
Michael Niedermayer
e6aba1be4c avformat/options_table: Fix flush_packet flag flags
Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-28 21:24:15 +02:00
Michael Niedermayer
c599c211fb avformat/mux: fix flush_packets flag with flushing buffers
Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-28 21:23:32 +02:00
Michael Niedermayer
823ea19a74 Merge commit '39975acc699c83af0a87a7318c0f41e189142938'
* commit '39975acc699c83af0a87a7318c0f41e189142938':
  rtpenc_jpeg: check for color_range too

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-28 12:40:01 +02:00
Vittorio Giovara
39975acc69 rtpenc_jpeg: check for color_range too 2014-06-28 01:51:14 -04:00
Gaullier Nicolas
134beb9e02 avformat/mxfenc: rename very recently added option to set/force channelcount in MXF D-10
Approved-by: Tomas Härdin <tomas.hardin@codemill.se>
Approved-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 03:29:51 +02:00
Michael Niedermayer
af75a85599 Merge commit '3f4edf012593c73941caa0ef9b292da00225c3df'
* commit '3f4edf012593c73941caa0ef9b292da00225c3df':
  dump_stream: print the timebase as is, do not reduce it

See: 75511c293a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 21:03:21 +02:00
Anton Khirnov
3f4edf0125 dump_stream: print the timebase as is, do not reduce it
It makes more sense to print the timebase exactly as it is set. Also,
this avoids a divide by zero when av_dump_format() is called on a format
context before writing the header.
2014-06-26 16:04:22 +02:00
Gaullier Nicolas
3eae34d50f avformat/mxfenc: set/force channelcount in MXF D-10
There are interoperability issues with D-10 related to the channelcount property in the generic sound essence descriptor.

On one side, SMPTE 386M requires channel count to be 4 or 8, other values being prohibited.
The most widespread value is 8, which seems straightforward as it is the actual size of the allocated structure/disk space.
At the end, it appears that some vendors or workflows do require this descriptor to be 8, and otherwise just "fail".

On the other side, at least AVID and ffmpeg do write/set the channel count to the exact number of channels really "used",
usually 2 or 4, or any other value. And on the decoding side, ffmpeg (for example) make use of the channel count for probing
and only expose this limited number of audio streams
(which make sense but has strong impact on ffmpeg command line usage, output, and downstream workflow).

At the end, I find it pretty usefull to simply give ffmpeg the ability to force/set the channel count to any value the user wants.
(there are turnaround using complex filters, pans, amerge etc., but it is quite boring and requires the command line to be adapted to the input file properties)

Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-26 01:01:22 +02:00
Michael Niedermayer
74bd039f8c avformat/nutdec: improve probe speed by 30%
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 18:40:40 +02:00
Michael Niedermayer
501158c682 avformat/wavenc: simplify malloc failure checking
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 13:51:40 +02:00
Michael Niedermayer
3bd0221bc1 avformat/wavenc: more specific error return for "Writing 16 bit peak for 8 bit audio"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 13:50:38 +02:00
Michael Niedermayer
d34d3304a8 avformat/wavenc: do not hardcode array size in memset and other functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 13:38:47 +02:00
Michael Niedermayer
2e1e10a6bb avformat/wavenc: use the bitexact flag from avformat instead of the one from avcodec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 13:32:27 +02:00
Georg Lippitsch
fd504f7c6f Peak Envelope Chunk encoder: Indent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 04:37:02 +02:00
Georg Lippitsch
e3b03da772 EBU Tech 3285 - Supplement 3 - Peak Envelope Chunk encoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 04:30:29 +02:00
Michael Niedermayer
ca350378de Merge commit 'f2f2e7627f0c878d13275af5d166ec5932665e28'
* commit 'f2f2e7627f0c878d13275af5d166ec5932665e28':
  Check mp3 header before calling avpriv_mpegaudio_decode_header().

Conflicts:
	libavformat/mp3enc.c

See: 2dd0da787c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 03:34:13 +02:00
Justin Ruggles
f2f2e7627f Check mp3 header before calling avpriv_mpegaudio_decode_header().
As indicated in the function documentation, the header MUST be
checked prior to calling it because no consistency check is done
there.

CC:libav-stable@libav.org
2014-06-22 20:31:58 -04:00
Michael Niedermayer
9e8c92226f Merge commit '85d805d5cccb2f57e7f2e2254d7a870f05926cfd'
* commit '85d805d5cccb2f57e7f2e2254d7a870f05926cfd':
  build: Add missing object files for webm muxer

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 00:31:22 +02:00
Michael Niedermayer
738272826f Merge commit '03391b5432a2b8b8dbc3d2db722a54dfb68737b9'
* commit '03391b5432a2b8b8dbc3d2db722a54dfb68737b9':
  build: Add missing object files for Matroska demuxer

Conflicts:
	libavcodec/Makefile
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 00:19:41 +02:00
Michael Niedermayer
2ca4802601 Merge commit '49470b9404583ab3aff6835f78a759349d331696'
* commit '49470b9404583ab3aff6835f78a759349d331696':
  build: Add missing replaygain object file for CAF demuxer

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 00:13:34 +02:00
Diego Biurrun
73953df71a Replace av_malloc() and memset(0) by av_mallocz() 2014-06-22 18:43:11 +02:00
Diego Biurrun
85d805d5cc build: Add missing object files for webm muxer 2014-06-22 06:28:46 -07:00
Diego Biurrun
03391b5432 build: Add missing object files for Matroska demuxer 2014-06-22 06:28:46 -07:00
Diego Biurrun
49470b9404 build: Add missing replaygain object file for CAF demuxer 2014-06-22 06:28:45 -07:00
Michael Niedermayer
dc5972f886 avformat/flvdec: give live_flvdec a separate name
This should fix a infinite loop on freebsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-21 20:27:45 +02:00
Carl Eugen Hoyos
e3fd263f0b Show duration for large asf files as written in the file header.
Fixes ticket #3428.
2014-06-21 20:00:18 +02:00
Diego Biurrun
97578f5f3b build: Add missing object file for Matroska demuxer
Fixes compilation with --disable-everything --disable-network --enable-demuxer=matroska

Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2014-06-21 11:53:43 +02:00
Moritz Barsnick
10b8481a26 fix several typos 2014-06-20 10:21:31 -08:00
Gaullier Nicolas
650ef18078 avformat/utils: better probing for duration in estimate_timings_from_pts()
It seems it is more secure to simply duplicate the computing routine from compute_pkt_fields to estimate_timings_from_pts.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 20:48:46 +02:00
James Almer
4c9ee1590f lavf/Makefile: fix standalone compilation of live_flv demuxer
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 13:25:28 +02:00
Michael Niedermayer
dacc4cb115 Merge commit 'c385313d2590fd26e26bb9bdacddef78162ab490'
* commit 'c385313d2590fd26e26bb9bdacddef78162ab490':
  rtsp: Support misordered fmtp rtpmap

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 23:27:01 +02:00
Michael Niedermayer
be94f5c171 Merge commit 'c9c1e00f95350e7a36b0d05a03939c7f6438e371'
* commit 'c9c1e00f95350e7a36b0d05a03939c7f6438e371':
  rtsp: Factor out fmtp parsing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 23:22:12 +02:00
Joshua Kordani
c385313d25 rtsp: Support misordered fmtp rtpmap
Issue present in Avigilon IP cameras.
2014-06-18 22:03:40 +02:00
Luca Barbato
c9c1e00f95 rtsp: Factor out fmtp parsing 2014-06-18 22:03:40 +02:00
Michael Niedermayer
1d54f51084 avformat/mux: simplify ff_choose_timebase()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 20:09:55 +02:00
Michael Niedermayer
75511c293a dump_stream_format: fix division by 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 19:49:23 +02:00
Michael Niedermayer
ac293b6685 Merge commit '194be1f43ea391eb986732707435176e579265aa'
* commit '194be1f43ea391eb986732707435176e579265aa':
  lavf: switch to AVStream.time_base as the hint for the muxer timebase

Conflicts:
	doc/APIchanges
	libavformat/filmstripenc.c
	libavformat/movenc.c
	libavformat/mxfenc.c
	libavformat/oggenc.c
	libavformat/swf.h
	libavformat/version.h
	tests/ref/lavf/mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 19:49:17 +02:00
Michael Niedermayer
2d70282254 Merge commit 'd754ed41727b1fcbab335b510248a9758a73320c'
* commit 'd754ed41727b1fcbab335b510248a9758a73320c':
  riffenc: take an AVStream instead of an AVCodecContext

Conflicts:
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 17:47:12 +02:00
Michael Niedermayer
95398aa949 Merge commit 'f792d3cbb8e8e35c54a9358a55dd596b7a40f228'
* commit 'f792d3cbb8e8e35c54a9358a55dd596b7a40f228':
  lavf: add the notimestamps flag to the muxers missing it

Conflicts:
	libavformat/adtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 17:28:10 +02:00
Michael Niedermayer
bd148ce07d Merge commit 'cfbdd7ffbd9fe14d110fd1bb89bf52f0f7bde016'
* commit 'cfbdd7ffbd9fe14d110fd1bb89bf52f0f7bde016':
  rtpenc: base max_frames_per_packet on avg_frame_rate, not codec timebase

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 17:27:06 +02:00
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).
2014-06-18 15:12:34 +02:00
Anton Khirnov
d754ed4172 riffenc: take an AVStream instead of an AVCodecContext
It will be useful in the following commits.

Also, rename the AVCodecContext pointer name from 'stream' to 'codec'.
2014-06-18 15:03:55 +02:00
Anton Khirnov
f792d3cbb8 lavf: add the notimestamps flag to the muxers missing it 2014-06-18 15:03:31 +02:00
Anton Khirnov
cfbdd7ffbd rtpenc: base max_frames_per_packet on avg_frame_rate, not codec timebase
Fall back to 1 (which is what is used for most cases anyway) when the
framerate is not set.
2014-06-18 15:03:16 +02:00
Anton Khirnov
894682a973 Remove avserver.
It has not been properly maintained for years and there is little hope
of that changing in the future.
It appears simpler to write a new replacement from scratch than
unbreaking it.
2014-06-18 14:55:28 +02:00
Michael Niedermayer
3f2f87cd5a Merge commit '74bc9458057f07c0820c3d3264396c4c64442e47'
* commit '74bc9458057f07c0820c3d3264396c4c64442e47':
  flvenc: Don't over-count metadata.

Conflicts:
	tests/ref/lavf/flv_fmt
	tests/ref/vsynth/vsynth1-flashsv
	tests/ref/vsynth/vsynth1-flv
	tests/ref/vsynth/vsynth2-flashsv
	tests/ref/vsynth/vsynth2-flv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 01:44:24 +02:00
Josh Allmann
74bc945805 flvenc: Don't over-count metadata.
Over-counting occurs if framerate is not set.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-17 21:38:21 +02:00
Michael Niedermayer
2fbdfba0f2 avformat/flvdec: Support live flv / NGINX RTMP streams
Fixes Ticket3553

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-16 23:43:11 +02:00
Michael Niedermayer
f0fbd9105b Merge commit '711aa2a82727907f778fb8aa9a93aff2120170f2'
* commit '711aa2a82727907f778fb8aa9a93aff2120170f2':
  lavf: dump stream side data when probing

Conflicts:
	libavformat/dump.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-16 12:54:36 +02:00
Michael Niedermayer
7b7afaf849 avformat/dump: put copyright back from the file from which dump.c was split out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-16 12:48:19 +02:00
Michael Niedermayer
83d100baea Merge commit '2dc265619a2fc9c6f9aff7ac2bcdbcb90e9610cb'
* commit '2dc265619a2fc9c6f9aff7ac2bcdbcb90e9610cb':
  lavf: group dump functions together

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-16 12:48:03 +02:00
Michael Niedermayer
c1b15c16ef avformat/smoothstreamingenc: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15 23:21:46 +02:00
Michael Niedermayer
153b5fb2fd avformat/framecrcenc: print the checksum and size of extradata as well
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15 18:07:03 +02:00
Michael Niedermayer
86a9370e2b avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15 01:33:17 +02:00
Vittorio Giovara
711aa2a827 lavf: dump stream side data when probing 2014-06-14 00:25:26 -04:00
Vittorio Giovara
2dc265619a lavf: group dump functions together 2014-06-14 00:24:35 -04:00
Michael Niedermayer
c600c8e966 Merge commit 'dca7ba4bffe3e4aeb620cb62955256a0d87561f4'
* commit 'dca7ba4bffe3e4aeb620cb62955256a0d87561f4':
  Remove some unnecessary CONFIG_FOO_COMPONENT ifdefs

Conflicts:
	libavcodec/ac3enc_float.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-12 20:25:48 +02:00
Diego Biurrun
dca7ba4bff Remove some unnecessary CONFIG_FOO_COMPONENT ifdefs
The files are only ever compiled if that condition is true.
2014-06-12 07:10:18 -07:00
Michael Niedermayer
27b8ef5bb7 avformat/oggparsevorbis: Dont attempt to calculate timestamps from gp=0
Fixes Ticket3710

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-11 18:12:14 +02:00
Michael Niedermayer
aff0912da5 Merge commit 'f121dbd9f76031d7f6d56261be2f14937a19d2dd'
* commit 'f121dbd9f76031d7f6d56261be2f14937a19d2dd':
  mpegts: Provide an option to override the pcr period

Conflicts:
	doc/muxers.texi
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 23:55:57 +02:00
Michael Niedermayer
2d99b4041f Merge commit '3f7e94eccd1c0d64679f2c4eda8bb942a158dfac'
* commit '3f7e94eccd1c0d64679f2c4eda8bb942a158dfac':
  mpegts: Move the option section to the bottom

Conflicts:
	libavformat/mpegtsenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 23:27:16 +02:00
Luca Barbato
f121dbd9f7 mpegts: Provide an option to override the pcr period
Certain hardware demuxer have specific restrictions for PCR periodicity.
2014-06-10 22:05:44 +02:00
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.
2014-06-10 22:05:44 +02:00
Michael Niedermayer
fbc133915b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Allow values >31bit for -analyzeduration.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 18:22:41 +02:00
Michael Niedermayer
3a76d7f73d avformat/nutenc: cleaner version check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 16:36:41 +02:00
Michael Niedermayer
d7f398c542 avformat/nutenc: Fix error handling in nut_write_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 15:41:33 +02:00
Michael Niedermayer
0f0f626048 avformat/rawdec: Increase probe score when "Content-Type: image/jpeg" is found at the file start
Based-on code by: Carl Eugen Hoyos and Andrey Utkin
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 14:42:19 +02:00
Carl Eugen Hoyos
5482780a3b Allow values >31bit for -analyzeduration. 2014-06-10 14:28:34 +02:00
Michael Niedermayer
ec2b6ee59a avformat/utils: dont wait for a first dts on demuxers which have AVFMT_NOTIMESTAMPS set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 14:22:13 +02:00
Michael Niedermayer
b45a451dbe avformat/rawdec: mark raw vc1 and mjpeg as having no timestamps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 14:21:24 +02:00
Michael Niedermayer
65571ee4e3 avformat/rawdec: add FF_DEF_RAWVIDEO_DEMUXER2, which allows specifying the flags
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 14:20:39 +02:00
Michael Niedermayer
2351ea8a2e avformat/nutenc: Fix error handling in write_sm_data()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-10 04:00:06 +02:00
Carl Eugen Hoyos
958168d505 lavf/mpegts: Reduce number of "Predefined SLConfigDescriptor" warnings shown. 2014-06-09 23:20:14 +02:00
Michael Niedermayer
2d3842f541 avformat: add mjpeg_probe()
Fixes Ticket3679

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 17:52:44 +02:00
Michael Niedermayer
52e563bb2f avformat/cavsvideodec: Fix probing when the file extension is avs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-09 05:17:34 +02:00
Michael Niedermayer
7c3af60016 avformat/movenc: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-08 15:26:03 +02:00
Michael Niedermayer
b2d1e22c2a avformat/udp: fix build on MINIX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-07 14:43:07 +02:00
Michael Niedermayer
74760883fc avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format extensions being enabled.
Found-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-07 12:03:31 +02:00
Vignesh Venkatasubramanian
c80181352c lavf/matroskaenc: Fix Cues on Audio for WebM DASH
Fix a change that was broken by [1]. Cues must be added for audio frames
on cluster start for WebM when the DASH flag is passed. Restoring
correct functionality.

[1] http://goo.gl/xYLq7Z

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-06 21:36:11 +02:00
Martin Storsjö
103243ca64 oggenc: Set the right AVOption size for the pref_duration option
On big endian machines, the default value set via the faulty
AVOption ended up as 2^32 times too big.

This fixes the fate-lavf-ogg test which currently is broken on
big endian machines, broken since 3831362. Since that commit,
a final zero-sized packet is written to the ogg muxer in that test,
which caused different flushing behaviour on little and big endian
depending on whether the pref_duration option was handled as it
should or not.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-06 19:22:14 +03:00
Michael Niedermayer
27b893b231 avformat/mov: fix "warning: variable altitude set but not used" warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-06 15:46:03 +02:00
Michael Niedermayer
a80342fe56 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Allow >2G for skip_initial_bytes.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-06 14:01:21 +02:00
Michael Niedermayer
a083543da0 Merge commit 'e7d6d0bf3c5cc1bc048b0ddbc169a91862568e0c'
* commit 'e7d6d0bf3c5cc1bc048b0ddbc169a91862568e0c':
  mov: Export geotag metadata fields

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-06 13:24:30 +02:00
Martin Storsjö
e7d6d0bf3c mov: Export geotag metadata fields
The '?xyz' form is used by android devices (and according to apple
mailing list archives, also by older iOS devices). The 'loci' field
(defined in 3GPP 26.244) is used by recent iOS devices.

Even though the loci field can contain an altitude, it was plain
0 in my sample. Just export longitude and latitude, in a string
format matching the one used by the '?xyz' metadata field.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-06 10:46:10 +03:00
Carl Eugen Hoyos
d58bcc1921 Allow >2G for skip_initial_bytes. 2014-06-06 09:16:53 +02:00
Michael Niedermayer
c7e54628e3 Merge commit '95b7fa1729b93bbb3f4fb85a5c0cb53cf970c3c7'
* commit '95b7fa1729b93bbb3f4fb85a5c0cb53cf970c3c7':
  oggenc: Support flushing the muxer

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-04 12:54:15 +02:00
Martin Storsjö
95b7fa1729 oggenc: Support flushing the muxer
This allows the caller to write all buffered data to disk, allowing
the caller to know at what byte position in the file a certain
packet starts (any packet written after the flush will be located
after that byte position).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-04 12:21:10 +03:00
Michael Niedermayer
571ab8344a avformat/avidec: allow rounding errors between scale/rate and timebase
Fixes Ticket3670

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-04 05:04:13 +02:00
Lou Logan
88f2586adb fix various typos
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 10:58:19 -08:00
Michael Niedermayer
72e4ceeb79 avformat/asfdec: Use a parser for mpeg4-asp to find has_b_frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 15:23:30 +02:00
Carl Eugen Hoyos
763e714442 Do not limit blocksize when reading PCM from aiff.
Fixes ticket #3695.
2014-06-03 03:07:55 +02:00
Michael Niedermayer
1a426d5404 avformat/utils/avformat_find_stream_info: Move max_analyze_duration setup out of the packet loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 21:21:11 +02:00
Michael Niedermayer
6f6edfe1c0 avformat/utils: Call ff_rfps_add_frame() only for video
This avoids some unneeded computations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 17:09:53 +02:00
Michael Niedermayer
bfb3ed1a9d avformat/mux: Dont leave stale side data pointers in ff_interleave_add_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 14:48:22 +02:00
Michael Niedermayer
74ece44373 avformat/mux: fix memleak of side data in flac fate tests
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 14:38:03 +02:00
Carl Eugen Hoyos
f284e85714 Report "unknown codec" instead of "unspecifed size" if the codec is unknown. 2014-06-02 08:33:40 +02:00
Michael Niedermayer
e91f27cbbb Merge commit '59cb5747ec3c5cd842b94e574c37889521c97cc4'
* commit '59cb5747ec3c5cd842b94e574c37889521c97cc4':
  rtmpproto: read metadata to set correct FLV header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-02 00:32:30 +02:00
Michael Niedermayer
6b9cbc9a11 Merge commit '3b18857ab301d2a0b3e86e9d85eed76f0798a29c'
* commit '3b18857ab301d2a0b3e86e9d85eed76f0798a29c':
  rtmppkt: Add method to read an AMF string that is not prefixed by its type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 23:56:22 +02:00
Michael Niedermayer
8225bf95bc Merge commit 'a1859032e39d96352687186fd179e1559dea2aca'
* commit 'a1859032e39d96352687186fd179e1559dea2aca':
  flvdec: Do not default to a video and audio stream

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 23:51:41 +02:00
Uwe L. Korn
59cb5747ec rtmpproto: read metadata to set correct FLV header
In the presence of no metadata, do not set any stream flag in the FLV
header but let the demuxer handle the detection and creation of streams
as data arrives.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-01 23:30:48 +03:00
Uwe L. Korn
3b18857ab3 rtmppkt: Add method to read an AMF string that is not prefixed by its type
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-01 23:30:33 +03:00
Uwe L. Korn
a1859032e3 flvdec: Do not default to a video and audio stream
If no streams were indicated in the FLV header, do not automatically
allocate by default a video and an audio stream. Instead, in the case
that the header did not indicate the presence of any data, allocate no
stream until data actually arrives for one type.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-01 23:29:40 +03:00
Michael Niedermayer
955b31a751 Merge commit 'e19d48dfce52f1417f7f06143b96fed00cbcdc52'
* commit 'e19d48dfce52f1417f7f06143b96fed00cbcdc52':
  flac muxer: support reading updated extradata from side data

Conflicts:
	libavformat/flacenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 14:16:29 +02:00
Michael Niedermayer
855e3b5700 Merge commit '0097cbea695e534fce39958ccd103af2fbf65831'
* commit '0097cbea695e534fce39958ccd103af2fbf65831':
  flac muxer: accept only STREAMINFO extradata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 14:12:04 +02:00
Michael Niedermayer
754bf1212c Merge commit 'd2ef708c95ace2518deffe830a9c439aeb9edd5d'
* commit 'd2ef708c95ace2518deffe830a9c439aeb9edd5d':
  matroskaenc: Allow VP9 and Opus in webm

Conflicts:
	libavformat/matroskaenc.c

See: 820ffaed0f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 12:00:20 +02:00
Anton Khirnov
e19d48dfce flac muxer: support reading updated extradata from side data 2014-06-01 08:32:33 +02:00
Anton Khirnov
0097cbea69 flac muxer: accept only STREAMINFO extradata
The other format (full flac header blocks) should not be exported by any
demuxers anymore.

This allows to drop an avpriv_ function and also simplify the following
commits.
2014-06-01 08:31:33 +02:00
Tudor Suciu
d2ef708c95 matroskaenc: Allow VP9 and Opus in webm
Bug-Id: 695

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-01 07:50:00 +02:00
Carl Eugen Hoyos
26b0d7198e Read mov files where the moov atom is hidden within a free atom.
Fixes ticket #1551 / issue 2226.
2014-05-31 16:57:27 +02:00
Carl Eugen Hoyos
aab2e939a9 Fix compilation with --disable-everything --enable-demuxer=matroska.
Fixes ticket #3693.
2014-05-31 16:29:02 +02:00
Carl Eugen Hoyos
6e67852881 Use rc_max_rate in av_find_best_stream() if bitrate == 0.
Fixes ticket #2042.
2014-05-31 13:41:10 +02:00
John Peebles
925f7980eb libavformat: output cues for each subtitle block in MKV muxer
Signed-off-by: John Peebles <johnpeeb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 13:26:48 +02:00
Michael Niedermayer
9c22e909ed Revert "avformat/movenchint: Fix movhinting with ff_rtp_chain_mux_open() from abb810db036628e11a5171134ebe320b187ee6d6"
This has become unneeded due to f797b134ca

This reverts commit 1fe40e1b05.
2014-05-31 12:54:00 +02:00
Michael Niedermayer
8c895ae73f Merge commit 'f797b134cad4d248b1c8955659997980d0668bc3'
* commit 'f797b134cad4d248b1c8955659997980d0668bc3':
  rtpenc_chain: Don't copy the time base to the source stream by default

See: 1fe40e1b05
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 12:53:46 +02:00
Martin Storsjö
f797b134ca rtpenc_chain: Don't copy the time base to the source stream by default
Only copy it manually in the muxers where it makes sense (rtspenc,
sapenc). Don't touch the original AVStream in movenchint, where
the original AVStream should be kept untouched.

This fixes the normal tracks in RTP hinted files after
abb810db - the hint tracks were ok while the normal media tracks
were broken, noticed by Michael Niedermayer.

This reverts abb810db but achieves the same effect for the other
muxers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-31 12:02:23 +03:00
Michael Niedermayer
2e532aa82d avformat/flvenc: fix assertion failure after 4h muxing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 01:43:41 +02:00
Michael Niedermayer
1fe40e1b05 avformat/movenchint: Fix movhinting with ff_rtp_chain_mux_open() from abb810db03
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 22:52:24 +02:00
Michael Niedermayer
692757062a Merge commit 'abb810db036628e11a5171134ebe320b187ee6d6'
* commit 'abb810db036628e11a5171134ebe320b187ee6d6':
  Revert "rtpenc_chain: Don't copy the time_base back to the caller"

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 22:03:51 +02:00
Martin Storsjö
abb810db03 Revert "rtpenc_chain: Don't copy the time_base back to the caller"
While it strictly isn't necessary to copy the time base (since
any use of it is scaled in ff_write_chained), it still is better
to signal the actual time base to the caller, avoiding one
unnecessary rescaling. This also lets the caller know what the
actual internal time base is, in case that is useful info
for some caller.

This reverts commit 397ffde115.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-30 22:45:42 +03:00
Michael Niedermayer
8716605a26 avformat/nutenc: Suggest genpts if AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 18:49:25 +02:00
Michael Niedermayer
b3dfebd641 avformat/matroskadec: fix off by 1 error in matroska_read_seek()
Fixes out of array read

Fixes: vp9-opus-crash.webm

Found-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-30 13:55:03 +02:00
Carl Eugen Hoyos
1acb5ca02a Improve frame size calculation in caf muxer to fix adpcm_ms remuxing.
Fixes ticket #3645.
2014-05-30 07:26:18 +02:00
Michael Niedermayer
4991eacc06 Merge commit '962d63157322466a9a82f9f9d84c1b6f1b582f65'
* commit '962d63157322466a9a82f9f9d84c1b6f1b582f65':
  matroskaenc: set the stream timebase earlier

Conflicts:
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 13:43:04 +02:00
Michael Niedermayer
e46cc1dab0 Merge commit '43e7f0797f9f821a3866a20f05e512e13c82076a'
* commit '43e7f0797f9f821a3866a20f05e512e13c82076a':
  flvenc: only write the framerate tag based on avg_frame_rate

Conflicts:
	tests/ref/lavf/flv_fmt
	tests/ref/seek/lavf-flv_fmt
	tests/ref/seek/vsynth2-flv
	tests/ref/vsynth/vsynth1-flashsv
	tests/ref/vsynth/vsynth1-flv
	tests/ref/vsynth/vsynth2-flashsv
	tests/ref/vsynth/vsynth2-flv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 13:30:12 +02:00
Michael Niedermayer
a72df4dadc Merge commit 'cf6977712c9e5abe6dc55289f6322ccbf10321a9'
* commit 'cf6977712c9e5abe6dc55289f6322ccbf10321a9':
  movenc: write avg_frame_rate as the framerate, not the codec timebase

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 13:07:33 +02:00
Michael Niedermayer
bc59d39b82 Merge commit '81eec081afea9fc017a175581ceea7c420a0dfc3'
* commit '81eec081afea9fc017a175581ceea7c420a0dfc3':
  matroskaenc: base DefaultDuration on the framerate, not the codec timebase

Conflicts:
	libavformat/matroskaenc.c
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv

See: ea83b032af
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 12:58:55 +02:00
Anton Khirnov
962d631573 matroskaenc: set the stream timebase earlier
Fixes calculating the ts offset for audio codecs with delay.
2014-05-29 08:01:58 +02:00
Anton Khirnov
43e7f0797f flvenc: only write the framerate tag based on avg_frame_rate
Do not fall back on the codec timebase, since that can be anything for
VFR video.
2014-05-29 08:01:30 +02:00
Anton Khirnov
cf6977712c movenc: write avg_frame_rate as the framerate, not the codec timebase 2014-05-29 08:01:23 +02:00
Anton Khirnov
81eec081af matroskaenc: base DefaultDuration on the framerate, not the codec timebase
This results in DefaultDuration not being written when the framerate is
not known, but as this field is purely informative, this should not
break any sane demuxers.
2014-05-29 08:00:57 +02:00
Michael Niedermayer
78a79a2ceb avformat/nutenc: replace conditional by assert
Its implied by sp_count==0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 04:26:18 +02:00
Michael Niedermayer
6d1aba6a29 avformat/nutenc: limit index table size if no index is going to be written
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 03:49:16 +02:00
Michael Niedermayer
82beb46e65 avformat/nutenc: add mode that omits the index
When the index is not written, several data tables become unneeded,
reducing memory and cpu requirements.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 03:37:37 +02:00
Michael Niedermayer
df889be0a8 nutenc: avoid av_tree_find() operation per syncpoint
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 03:20:04 +02:00
Michael Niedermayer
6b041cb617 avformat/nutdec: Fix handling of older 4.0 files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:48:02 +02:00
Michael Niedermayer
170a4d79c0 avformat/nutenc: bump minor version due to broadcast/pipe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:44:02 +02:00
Michael Niedermayer
45daae06fd avformat/nutenc: change check to match comment
The code appears to assume STABLE will never change

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:41:56 +02:00
Michael Niedermayer
99b15f1daa avformat/nutenc: fix used version value
The broadcast/pipe flags arent stable + 1 they would be 4 or whenever but wouldnt change based
on which is stable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:40:07 +02:00
Michael Niedermayer
a8499cbbe8 Merge commit 'c94e2e85cb6af8a570d8542a830556243bd32873'
* commit 'c94e2e85cb6af8a570d8542a830556243bd32873':
  nut: Support experimental NUT 4 features

Conflicts:
	doc/nut.texi
	libavformat/nut.h
	libavformat/nutdec.c
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:13:59 +02:00
Michael Niedermayer
d858ee717b Merge commit '6d212599aa684f30511fb08ca30fe2378405304e'
* commit '6d212599aa684f30511fb08ca30fe2378405304e':
  avformat: Provide a standard compliance flag

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 00:20:48 +02:00
Luca Barbato
c94e2e85cb nut: Support experimental NUT 4 features
Add the low overhead pipe mode and the extended broadcast mode.
Export the options as 'syncponts' since it impacts only that.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-05-28 22:04:56 +02:00
Luca Barbato
6d212599aa avformat: Provide a standard compliance flag
Provide f_strict for avconv usage.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-05-28 22:04:56 +02:00
Michael Niedermayer
7dba055bb0 oggenc: Fix the EOS flag
This corrects the bug that caused the checksums to change in
9767d7c092.

It caused the EOS flag to be set incorrectly; the ogg spec does not
allow it to be set in the middle of a logical bitstream.

Signed-off-by: Andrew Kelley <superjoe30@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-28 21:51:38 +03:00
Vignesh Venkatasubramanian
c14045c818 lavf: Remove experimental flag for Opus in WebM
Opus in WebM is no more experimental as we have everything necessary in
the container writing code as per the spec. So removing the experimental flag.
Note that we removed the experimental suffix from the CodecId field long
ago ( http://goo.gl/O0TYRB ).

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 19:29:45 +02:00
Lazaros Koromilas
0f87b42b44 libavformat/utils: Warning about invalid cover art instead of an error
This way other streams can still be used with the -map option.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 19:12:02 +02:00
Michael Niedermayer
cf3a038f50 avformat/matroskaenc: fix ident string
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 15:15:14 +02:00
Michael Niedermayer
61917a104e Merge commit '106b62f4ba600f24415eaded5e020aeceb23fd59'
* commit '106b62f4ba600f24415eaded5e020aeceb23fd59':
  matroskaenc: write the channel mask for FLAC

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 13:19:26 +02:00
Michael Niedermayer
dff4aa6afd Merge commit 'efcde917af407a6031ecff68edd51fce7b83d104'
* commit 'efcde917af407a6031ecff68edd51fce7b83d104':
  vorbiscomment: simplify API by using av_dict_count()

Conflicts:
	libavformat/flacenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 13:08:50 +02:00
Michael Niedermayer
579e2b2874 Merge commit '23f741f79327e31be7b2a75ebb2e02111e06e52f'
* commit '23f741f79327e31be7b2a75ebb2e02111e06e52f':
  matroskadec: parse the channel layout mask for FLAC

Conflicts:
	libavformat/oggparsevorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 13:02:19 +02:00
Michael Niedermayer
1c0ce2d4e0 Merge commit '4efdadc8ec50332c812e8a95e8c67f5a260e7cb0'
* commit '4efdadc8ec50332c812e8a95e8c67f5a260e7cb0':
  matroskadec: export just the STREAMINFO block as FLAC extradata

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 12:49:28 +02:00
Michael Niedermayer
69de229bb8 Merge commit '6df478bf891b9fc5626e4a0b993899f310ba0a1c'
* commit '6df478bf891b9fc5626e4a0b993899f310ba0a1c':
  matroskadec: split parsing tracks into a separate function

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 12:41:35 +02:00
Michael Niedermayer
40beec6a43 Merge commit '5fdaf312c5541b77b6364db8b49d6abb416a25c0'
* commit '5fdaf312c5541b77b6364db8b49d6abb416a25c0':
  flac: make avpriv_flac_parse_block_header() inline

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 12:33:49 +02:00
Michael Niedermayer
61301ca786 Merge commit '54ed488b1af583df6c9d2a73b4a44f16b7e4f82c'
* commit '54ed488b1af583df6c9d2a73b4a44f16b7e4f82c':
  flac muxer: write WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag for multichannel files

Conflicts:
	libavformat/flacenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 12:28:23 +02:00
Michael Niedermayer
03ffaed3f0 Merge commit 'd6b9ce99ea384fb676561461768b8316725a4ccd'
* commit 'd6b9ce99ea384fb676561461768b8316725a4ccd':
  flac demuxer: parse the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 12:21:50 +02:00
Anton Khirnov
106b62f4ba matroskaenc: write the channel mask for FLAC 2014-05-28 07:55:14 +02:00
Anton Khirnov
efcde917af vorbiscomment: simplify API by using av_dict_count() 2014-05-28 07:54:54 +02:00
Anton Khirnov
23f741f793 matroskadec: parse the channel layout mask for FLAC
It is commonly stored in a vorbiscomment block in codec private data.
2014-05-28 07:50:32 +02:00
Anton Khirnov
4efdadc8ec matroskadec: export just the STREAMINFO block as FLAC extradata
It contains all information that is used by the decoder and the other
FLAC-capable demuxers (flacdec, ogg) export only STREAMINFO as well.
2014-05-28 07:49:15 +02:00
Anton Khirnov
6df478bf89 matroskadec: split parsing tracks into a separate function 2014-05-28 07:48:59 +02:00
Anton Khirnov
5fdaf312c5 flac: make avpriv_flac_parse_block_header() inline
This avoids all the ABI troubles associated with avpriv_.
Since this function is very small and does not depend on any tables,
making it inline should have no adverse effects.
2014-05-28 07:48:30 +02:00
Anton Khirnov
54ed488b1a flac muxer: write WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag for multichannel files 2014-05-28 07:47:31 +02:00
Anton Khirnov
d6b9ce99ea flac demuxer: parse the WAVEFORMATEXTENSIBLE_CHANNEL_MASK tag
It is used to store the channel mask for non-standard layouts.
2014-05-28 07:47:15 +02:00
Lazaros Koromilas
bbc10a1aa5 libavformat/utils: Fix segfault on m4a cover artwork parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 03:35:39 +02:00
Michael Niedermayer
919c320f72 avformat/oggenc: fix EOS flag
This corrects the bug that caused the checksums to change in
9767d7c092

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 01:12:18 +02:00
Michael Niedermayer
b5657516b2 Merge commit '9767d7c092c890ecc5953452e8a951fd902dd67b'
* commit '9767d7c092c890ecc5953452e8a951fd902dd67b':
  oggenc: Flush after writing headers

Conflicts:
	tests/ref/lavf/ogg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 01:00:10 +02:00
Michael Niedermayer
5313d60dc0 Merge commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1'
* commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1':
  oggenc: Move ogg_write_pages up above ogg_write_header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28 00:28:08 +02:00
Michael Niedermayer
5be8c27694 avformat/rtspdec: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-27 20:42:50 +02:00
Andrew Kelley
9767d7c092 oggenc: Flush after writing headers
Before, header information for ogg format files was sent with the
first encoded packet.

This patch makes it so that it is possible for API users to
differentiate between headers and encoded audio. This is useful, for
example, when creating an audio stream where you want to send one set
of headers for every client that connects and then the encoded stream
of audio.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-27 20:16:59 +03:00
Andrew Kelley
1d3eb0b573 oggenc: Move ogg_write_pages up above ogg_write_header
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-27 20:16:58 +03:00
Michael Niedermayer
e6a084641a avformat/utils: set max analyze duration depending on the circumstances
Fixes Ticket3673

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-26 22:33:01 +02:00
Michael Niedermayer
52887aa409 avformat: move default for max_analyze_duration into utils.c
this way we can do better tha a single fixed constant value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-26 22:33:01 +02:00
Carl Eugen Hoyos
2d56f0d054 Write the actual mp3 frame size when muxing into caf if available.
Fixes ticket #3648.
2014-05-26 20:28:07 +02:00
Michael Niedermayer
96470ca22b avformat/mov: allow seeking back to the begin even if nothing is marked as keyframe
Fixes Ticket 3663

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-26 01:23:46 +02:00
Michael Niedermayer
d236d4907c update APIchanges & version for c37d179
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-26 00:20:07 +02:00
Michael Niedermayer
c37d179295 avformat: add format_probesize to allow tuning the maximum amount of bytes to identify the filetype
Currently probesize is cliped at 1mb before being used for format detection.
Alternatively this cliping could be removed but this would then tie various
things like stream analysis to the file detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 23:54:34 +02:00
Michael Niedermayer
ee9b0199c8 Merge commit 'e0d01dc7d7fc3ce4c23f286a10870e9599c8b8b9'
* commit 'e0d01dc7d7fc3ce4c23f286a10870e9599c8b8b9':
  smoothstream: check malloc calls

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 13:07:45 +02:00
Aman Gupta
4372fb7a57 avcodec/webvttenc: add webvtt encoder
Based off the srt encoder. The following features are unimplemented:

- fonts, colors, sizes
- alignment and positioning

The rest works well. For example, use ffmpeg to convert subtitles into the .vtt format:

  ffmpeg -i input.srt output.vtt

Signed-off-by: Aman Gupta <ffmpeg@tmm1.net>
Signed-off-by: Clément Bœsch <u@pkh.me>
2014-05-25 03:04:14 +02:00
Michael Niedermayer
726316240b Merge commit '8692e6284f5169257a537c8fc25addf32fc67c87'
* commit '8692e6284f5169257a537c8fc25addf32fc67c87':
  rdt: check malloc calls

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 13:21:33 +02:00
Clément Bœsch
cba92a2226 avformat/vobsub: do not create empty streams.
Fixes NULL dereference in vobsub_read_packet() on vobsub->q[i]->subs.

Fixes ticket #3669.
2014-05-24 11:08:34 +02:00
Nidhi Makhijani
e0d01dc7d7 smoothstream: check malloc calls
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-05-24 08:21:49 +02:00
Nidhi Makhijani
8692e6284f rdt: check malloc calls
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-05-24 07:51:12 +02:00
Clément Bœsch
e63a17bfdc avformat/mov: use av_display_rotation_get() for rotate metadata. 2014-05-23 23:30:21 +02:00
Carl Eugen Hoyos
27d460fe98 Refuse to mux H.264 with fourcc H264 into avi without startcode.
Fixes ticket #3638.
2014-05-23 16:20:22 +02:00
Michael Niedermayer
64bf845544 avformat/mov: Dont blindly trust the stream duration in seting chapter times
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 04:39:55 +02:00
Michael Niedermayer
220df143b9 avformat/utils: Check end time in avpriv_new_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 04:33:05 +02:00
Michael Niedermayer
744df0a031 avformat/movenc: Check that packet duration is valid in ff_mov_write_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 04:00:29 +02:00
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
2014-05-22 23:34:59 +02:00
Vignesh Venkatasubramanian
37cef8c774 libavformat/matroskaenc: Add WebM DASH support
WebM DASH specification [1] requires the Clusters and Cues to be output in a
specific way. Adding a flag to matroskaenc that will enable support for
creating WebM/Mkv files conforming to the WebM DASH specification.

[1] http://wiki.webmproject.org/adaptive-streaming/webm-dash-specification

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 18:53:13 +02:00
Carl Eugen Hoyos
eff913c972 Autodetect Asterisk raw pcm with extension "sln". 2014-05-22 15:15:04 +02:00
Carl Eugen Hoyos
afaa39b46d Don't overwrite codec_id with 0 in ff_mp4_read_dec_config_descr().
Fixes ticket #3660.
2014-05-21 22:48:11 +02:00
Michael Niedermayer
7f7080dc73 avformat: add av_stream_get_end_pts()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 18:53:12 +02:00
Michael Niedermayer
7d25af1547 Merge commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37'
* commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37':
  lavf: add av_stream_get_side_data

Conflicts:
	doc/APIchanges
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 03:39:04 +02:00