Commit Graph

16243 Commits

Author SHA1 Message Date
Michael Niedermayer
f0ae0354d3 avformat/avidec: fix handling dv in avi
Fixes Ticket4086

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-21 03:34:13 +01:00
Carl Eugen Hoyos
25ccf5df72 lavf/mux: Always call write_trailer() from av_write_trailer() to avoid a leak.
Fixes ticket #4049.
2014-11-20 10:14:51 +01:00
Michael Niedermayer
0dba982bb4 avformat/dtsdec: dts_probe: check reserved bit, check lfe, check sr_code similarity
Fixes misdetection of s16le
Fixes Ticket4109

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-20 00:21:09 +01:00
Michael Niedermayer
fbb6de2ad7 Merge commit '7fd10f66b722eccc2ada9128766d002f6d751f79'
* commit '7fd10f66b722eccc2ada9128766d002f6d751f79':
  hdsenc: Clear the previous codec tag when setting up the chained muxer

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-19 20:30:07 +01:00
Michael Niedermayer
f3dcabef33 Merge commit 'f918b8a2933a65020cbe490ec637d5485c11a692'
* commit 'f918b8a2933a65020cbe490ec637d5485c11a692':
  hdsenc: Use the right filename in an error message

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-19 20:24:11 +01:00
Michael Niedermayer
660a8b43ab avformat/avienc: write last frame duration
Fixes small part of Ticket 3052

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-19 20:23:04 +01:00
Michael Niedermayer
be44856483 avformat/avienc: factor frame skip code out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-19 20:18:03 +01:00
Martin Storsjö
7fd10f66b7 hdsenc: Clear the previous codec tag when setting up the chained muxer
The chained flv muxer wants one set of tags - normally this set
could be signaled via the AVOutputFormat codec_tag field (as
smoothstreamingenc and dashenc do). hdsenc doesn't signal it, since
the FLV codec tag arrays aren't exported from flvenc.c. This can
lead to the caller keeping an original codec tag from the originating
container here, which would then be a mismatch for the FLV muxer.
Since we don't really care about what codec tag the caller might
have set, just clear it and let the lavf muxer layer set the right
one for the chained FLV muxer later instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-19 13:37:00 +02:00
Martin Storsjö
f918b8a293 hdsenc: Use the right filename in an error message
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-19 13:36:43 +02:00
Stefano Sabatini
484d42a097 lavf/concatdec: add timestamp log
Help debugging timestamp conversion issues.
2014-11-19 11:17:43 +01:00
dedicatedbroadcastsolutions
873dac50f5 avformat/mpegtsenc: change the min value for mpegts_start_pid to allow ATSC PIDs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-19 00:49:18 +01:00
Rodger Combs
5f8fcdd448 dashenc: degrade gracefully if a stream's bitrate is unavailable
If a stream's bitrate is not set, this attempts to use its rc_max_rate;
if neither is set, it avoids writing a bandwidth attribute at all.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 21:18:53 +01:00
James Almer
bccae39072 lavf/ffmenc: fix memleak in ffm_write_header
Regression since 745730c9c2.
The dynamic buffer was not being used or freed.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-11-18 13:45:24 -03:00
Michael Niedermayer
0b75b6c3cd avformat/mp3dec: avoid seeking to negative positions
Fixes Ticket4038

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 04:04:37 +01:00
Michael Niedermayer
4cd4a6de4f Merge commit '2007082d2db25f9305b8a345798b840ea7784fdb'
* commit '2007082d2db25f9305b8a345798b840ea7784fdb':
  mov: check ff_get_wav_header() return value

Conflicts:
	libavformat/mov.c

See: 6d55a40b00
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 03:34:05 +01:00
Michael Niedermayer
9943c5a42b Merge commit '9257692ac15eff7b07540c1f61cebde0d8823fbd'
* commit '9257692ac15eff7b07540c1f61cebde0d8823fbd':
  lavf: Only initialize s->offset once when using avoid_negative_ts make_zero

Conflicts:
	libavformat/mux.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 02:46:07 +01:00
Vittorio Giovara
2007082d2d mov: check ff_get_wav_header() return value
CC: libav-stable@libav.org
Bug-Id: CID 717497
2014-11-18 00:40:06 +01:00
Vittorio Giovara
a28468d0da librtmp: append the correct field to the string
Also prevent a NULL pointer dereference.

CC: libav-stable@libav.org
Bug-Id: CID 1250329 / CID 1250331
2014-11-18 00:38:26 +01:00
Michael Niedermayer
e60c025e73 Merge commit 'c302d034ba2690a935df8bf7e4f5d44ed86e8d5c'
* commit 'c302d034ba2690a935df8bf7e4f5d44ed86e8d5c':
  tools: Add a sidxindex tool

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 23:09:22 +01:00
Michael Niedermayer
4dc305d784 Merge commit '40ed1cbf147d09fc0894bee160f0b6b6d9159fc5'
* commit '40ed1cbf147d09fc0894bee160f0b6b6d9159fc5':
  movenc: Allow writing a DASH sidx atom at the start of files

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 23:02:02 +01:00
Michael Niedermayer
3fa4351d6b Merge commit '3847f3ab58b3b74604807394247bf68827258103'
* commit '3847f3ab58b3b74604807394247bf68827258103':
  movenc: Add tfra entries for all tracks in a moof

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 22:24:05 +01:00
Martin Storsjö
9257692ac1 lavf: Only initialize s->offset once when using avoid_negative_ts make_zero
When given a stream starting at dts=0, it would previously consider
s->offset as uninitialized and set an offset when the second packet
was written, ending up writing two packets with dts=0. By initializing
this field to AV_NOPTS_VALUE, we make sure that we only initialize it
once, on the first packet.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 23:18:55 +02:00
Michael Niedermayer
b5b15c4dd9 Merge commit 'fe5e6e34c05e274f98528be4f77f3c474473f977'
* commit 'fe5e6e34c05e274f98528be4f77f3c474473f977':
  lavf: Add an MPEG-DASH ISOFF segmenting muxer

Conflicts:
	Changelog
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 22:13:50 +01:00
Michael Niedermayer
9e0b0c60bd Merge commit '2ded57371abead879bcee56da5131e5fac0d17ef'
* commit '2ded57371abead879bcee56da5131e5fac0d17ef':
  movenc: Add support for writing sidx atoms for DASH segments

Conflicts:
	Changelog
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 21:55:23 +01:00
Michael Niedermayer
1fddfaa282 Merge commit '2d9d6afb8d2f284f5e620ecc19f643d5cd3facb8'
* commit '2d9d6afb8d2f284f5e620ecc19f643d5cd3facb8':
  movenc: Factorize adding fragment info into a separate function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 21:43:43 +01:00
Michael Niedermayer
b96c1cd78b Merge commit '0f9eb9165bb7d7982fdedf64f6bcec856f1bedd6'
* commit '0f9eb9165bb7d7982fdedf64f6bcec856f1bedd6':
  movenc: Include empty tracks in iods when writing fragmented mp4

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 21:22:47 +01:00
Carl Eugen Hoyos
92c07acce7 Read (display) aspect ratio from mxf files.
Fixes ticket #4107.
2014-11-17 17:54:32 +01:00
Martin Storsjö
c302d034ba tools: Add a sidxindex tool
This tool can write an MPD file for fragmented MP4 files with
a sidx index at the start of the file.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 16:17:07 +02:00
Martin Storsjö
40ed1cbf14 movenc: Allow writing a DASH sidx atom at the start of files
This is mapped to the faststart flag (which in this case
perhaps should be called "shift and write index at the
start of the file"), which for fragmented files will
write a sidx index at the start.

When segmenting DASH into files, there's usually one sidx
at the start of each segment (although it's not clear to me
whether that actually is necessary). When storing all of it
in one file, the MPD doesn't necessarily need to describe
the individual segments, but the offsets of the fragments can be
fetched from one large sidx atom at the start of the file. This
allows creating files for the DASH ISO BMFF on-demand profile.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 16:17:07 +02:00
Martin Storsjö
3847f3ab58 movenc: Add tfra entries for all tracks in a moof
Previously only tfra entries were added for the first track in each moof.

The frag_info array used for tfra can also be used for writing
other kinds of fragment indexes, where it's more important to
include all tracks.

When the separate_moof option is enabled (as in ismv), we write
a separate moof for each track, so this doesn't make any difference
in that case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 16:17:07 +02:00
Martin Storsjö
fe5e6e34c0 lavf: Add an MPEG-DASH ISOFF segmenting muxer
This is mostly to serve as a reference example on how to segment
the output from the mp4 muxer, capable of writing the segment
list in four different ways:
- SegmentTemplate with SegmentTimeline
- SegmentTemplate with implicit segments
- SegmentList with individual files
- SegmentList with one single file per track, and byte ranges

The muxer is able to serve live content (with optional windowing)
or create a static segmented MPD.

In advanced cases, users will probably want to do the segmenting
in their own application code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 16:17:07 +02:00
Martin Storsjö
2ded57371a movenc: Add support for writing sidx atoms for DASH segments
A flag "dash" is added, which enables the necessary flags for
creating DASH compatible fragments.

When this is enabled, one sidx atom is written for each track
before every moof atom.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 16:16:46 +02:00
Martin Storsjö
2d9d6afb8d movenc: Factorize adding fragment info into a separate function
By calling this after writing the moof the first time (for
calculating the moof size), we can avoid intermediate storage
of tfrf_offset in MOVTrack.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 16:13:02 +02:00
Martin Storsjö
0f9eb9165b movenc: Include empty tracks in iods when writing fragmented mp4
When writing fragmented streams with an empty initial moov,
we won't have any samples in any tracks when writing the
moov atom, thus trust that any tracks that are added actually
will be present.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-17 16:12:02 +02:00
Michael Niedermayer
cc5f731541 avformat/flvenc: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 13:08:05 +01:00
Michael Niedermayer
4127d97c8d Merge commit 'c64f3615118d757dcf76040fe5407bf2b3883206'
* commit 'c64f3615118d757dcf76040fe5407bf2b3883206':
  flvenc: Send new metadata when FLAG_METADATA_UPDATED is set.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 13:01:39 +01:00
Michael Niedermayer
bb7be3b763 Merge commit '4d0cd5f58c892276716f46f4b2702915e5018215'
* commit '4d0cd5f58c892276716f46f4b2702915e5018215':
  flvenc: move metadata updates into a single function

Conflicts:
	libavformat/flvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 12:43:55 +01:00
Andrew Stone
c64f361511 flvenc: Send new metadata when FLAG_METADATA_UPDATED is set.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-17 09:28:16 +01:00
Andrew Stone
4d0cd5f58c flvenc: move metadata updates into a single function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-17 09:28:06 +01:00
Michael Niedermayer
51ddaf6549 avformat/mpeg: fix memleak of sub_name on error
Fixes CID1254666

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-16 19:17:34 +01:00
Michael Niedermayer
530eb6acf8 avformat/hlsenc: Free context after hls_append_segment
Fixes reading uninitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-16 04:32:54 +01:00
Michael Niedermayer
ce80f9fee9 avformat/segment: export inner muxer timebase
Fixes "Non-monotonous DTS in output stream 0:0"
Fixes Ticket4020

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-16 03:02:29 +01:00
Lukasz Marek
ec01283752 lavf/ffmdec: reident after last commit
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-16 01:57:26 +01:00
Lukasz Marek
745730c9c2 lavf/ffm: use AVOption API to store/restore stream properties
This is a generic solution that will not reqiore modifications when new options are added.
This also fixes problem with current implementation when qmin or qmax=-1.
Only 8 bits was sent and read back as 255.

Fixes #1275
Fixes #1461

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-16 01:13:38 +01:00
Lukasz Marek
6690d4c3f5 lavf/ffm: store/restore private codec context
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-16 01:13:38 +01:00
Michael Niedermayer
deccb4d827 avformat/http: simplify chained_options copying
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15 14:30:32 +01:00
Brandon Lees
ffaf2074eb Fix the timeout option not working when connecting to a HTTP url that requires authentication.
In http_open_cnx, the patch restores the AVDictionary if connection needs to be re-tried
because of a authentication/redirect status code.

Previously, if a 401/407/30x status code was encountered, http_open_cnx would restart at the redo label, but any options
used by the underlying protocol would be missing because they were removed by the first attempt.

Signed-off-by: Brandon Lees <brandon@n-hega.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15 14:30:32 +01:00
Mika Raento
b08fd7ea78 mov.c: fix handling of seek return in read_mfra
this would cause mfra to be ignored in files larger than 2G

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15 12:04:34 +01:00
Michael Niedermayer
f3c324a0fe Merge commit '3a6bb9735053c453f806ceab1d91124648d90aca'
* commit '3a6bb9735053c453f806ceab1d91124648d90aca':
  Icecast: Send 100-continue header if possible

See: 17dc39e76b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15 11:30:42 +01:00
Marvin Scholz
8562c1483b Icecast: Send content-type in all cases
This is needed because Icecast since version 2.4.1 doesn't default
to audio/mpeg anymore. AVOption default not used here, since a later
check if -content_type is set is performed and would break.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-11-15 09:15:39 +01:00