1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-14 21:35:06 +02:00
Commit Graph

15425 Commits

Author SHA1 Message Date
Stefano Sabatini
526bd7bdfa lavf/segment: set segment end time when the first packet arrives
Avoid negative durations in case there is a single packet in the current
segment, since in that case the end time is still set to the previous
segment end time.
2014-07-17 16:51:51 +02:00
Stefano Sabatini
3d38c99041 lavf/segment: fix weird indent 2014-07-17 16:51:51 +02:00
Stefano Sabatini
b6a8c5245f lavf/segment: show incoming packet duration in debug message 2014-07-17 16:51:51 +02:00
Stefano Sabatini
5acad50056 lavf/segment: only use reference frames for computing the segment end time
This avoids a systematic overestimate of the segments duration when there
are several streams.

Fix trac ticket #3724.
2014-07-17 16:51:50 +02:00
Michael Niedermayer
88f038ac97 avformat/dv: implement fallback in dv_extract_pack()
Fixes Ticket2340
Fixes Ticket2341

Based-on mail from Dave Rice <dave@dericed.com>
Tested-by: Dave Rice <dave@dericed.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-17 15:29:27 +02:00
Michael Niedermayer
e5cb7795fc Merge commit '324ff59444ff5470bb325ff1e2be7c4b054fc944'
* commit '324ff59444ff5470bb325ff1e2be7c4b054fc944':
  avpacket: Check for and return errors in ff_interleave_add_packet()

Conflicts:
	libavformat/audiointerleave.c
	libavformat/internal.h
	libavformat/mux.c

See: 4d7c71c364
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-17 14:20:10 +02:00
Nidhi Makhijani
324ff59444 avpacket: Check for and return errors in ff_interleave_add_packet()
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-17 03:18:46 -07:00
Simon Thelen
fa6716c66d libavformat/segment: change segment_list_size behavior to match hls_list_size behavior.
Make the segment muxer keep segment_list_size segments instead of
segment_list_size + 1 segments. This patch also changes the
documentation for segment_list_size to reduce possible confusion over
how many segments are kept.

this allows the segment list to
be limited to containing only one segment which used to be impossible
because a segment_list_size of 0 kept all the segments and a
segment_list_size of 1 kept 2 segments.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-17 02:35:56 +02:00
Michael Niedermayer
37a0ac1d82 avformat: Micro bump for "md5enc: add format_version, to allow selecting which version to use"
Suggested-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-16 22:58:29 +02:00
Michael Niedermayer
7da2592f56 avformat/md5enc: add format_version, to allow selecting which version to use
Currently there is just version 1
Fixes remaining part of Ticket2280

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-16 22:50:24 +02:00
Michael Niedermayer
e240d01c12 avformat/matroskadec: fix declaration after statement
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-16 00:06:15 +02:00
Vignesh Venkatasubramanian
3e73d14290 lavf: Add WebM DASH Manifest Muxer
This patch adds the ability to generate WebM DASH manifest XML using
ffmpeg. A sample command line would be as follows:

ffmpeg \
  -f webm_dash_manifest -i video1.webm \
  -f webm_dash_manifest -i video2.webm \
  -f webm_dash_manifest -i audio1.webm \
  -f webm_dash_manifest -i audio2.webm \
  -map 0 -map 1 -map 2 -map 3 \
  -c copy \
  -f webm_dash_manifest \
  -adaptation_sets “id=0,streams=0,1 id=1,streams=2,3” \
  manifest.xml

It works by exporting necessary fields as metadata tags in matroskadec
and use those values to write the appropriate XML fields as per the WebM
DASH Specification [1]. Some ideas are adopted from webm-tools project
[2].

[1]
https://sites.google.com/a/webmproject.org/wiki/adaptive-streaming/webm-dash-specification
[2]
https://chromium.googlesource.com/webm/webm-tools/+/master/webm_dash_manifest/

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 23:58:36 +02:00
Vignesh Venkatasubramanian
5a20656946 lavf/matroska: Add functions for WebM DASH Manifest
Add functions and logic to matroskadec for use by the WebM DASH Manifest
XML Muxer. The actual muxer is added in a future patch.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 23:56:17 +02:00
Michael Niedermayer
62227a70f0 avformat: add av_stream_get_parser() to access avformat AVParser
The AVStream.parser field is considered private and its location cannot be
preserved while preserving also ABI compatibility to libav, as libav added fields
before it.
Some tools like ffmpeg.c access this field though

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 21:17:20 +02:00
Michael Niedermayer
6821572499 avformat/movenc: dont mark multichannel as mono tracks as containing the center channel
Fixes Ticket3727

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 17:11:11 +02:00
Michael Niedermayer
47c84c0bf7 avformat/wavdec: add basic sanity check for the sample count
Fixes Ticket3708

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 14:52:18 +02:00
Michael Niedermayer
2db1bcf1b9 avformat/asfdec: Try to improve skip case
Fixes Ticket3761

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 01:16:08 +02:00
Lukasz Marek
4cc0f79a2c lavf: add samba protocol via libsmbclient
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-13 20:38:55 +02:00
Star Brilliant
3f815f713b AVFormat: LRC demuxer and muxer
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-13 19:18:31 +02:00
Michael Niedermayer
4eb13cdfb0 avformat/asfdec: dvrms timestamps are pts not dts
Should fix Ticket3328

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-13 03:50:47 +02:00
Michael Niedermayer
8202c49b43 avformat/utils: do not wait for packets from discarded streams for genpts
Fixes long loop
Fixes Ticket3208

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-13 01:07:59 +02:00
Michael Niedermayer
4470a3eeaf avformat/mpegts: dont clear programs during probing
Fixes Ticket 3763

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 21:49:15 +02:00
Lukasz Marek
ca671beead lavf/libssh: set freed pointers to NULL
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 03:01:38 +02:00
Paul B Mahol
6779bf3f0f avformat/wavenc: use av_mallocz_array()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-07-11 10:38:45 +00:00
Michael Niedermayer
c6c172d173 avformat/mpegts: skip updating programs/streams when determining duration
Fixes Ticket2441

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 16:43:27 +02:00
Michael Niedermayer
375d7ee805 Merge commit 'df2aa22203afc9377832bdf800df5dbd3aa9687e'
* commit 'df2aa22203afc9377832bdf800df5dbd3aa9687e':
  mov: Clarify tkhd flag settings

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 13:07:26 +02:00
Michael Niedermayer
4c91599484 Merge commit 'f90729699db9ede2bef2b28000f1795dab1b8996'
* commit 'f90729699db9ede2bef2b28000f1795dab1b8996':
  mov: Do not group tracks if more than one is enabled per type

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 12:41:57 +02:00
Luca Barbato
df2aa22203 mov: Clarify tkhd flag settings 2014-07-11 11:07:35 +02:00
Luca Barbato
f90729699d mov: Do not group tracks if more than one is enabled per type
The specification requires at most 1 track enabled per alternate group.
2014-07-11 11:07:06 +02:00
Michael Niedermayer
0089fb79cc avformat/cdg: Do not fail if filesize cannot be determined
This fixes cdg with piped input which was broken by the previous commit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 01:04:04 +02:00
Michael Niedermayer
20ad2152dd Merge commit '44386aaad870cbd80ae0d08247ebc663476446ff'
* commit '44386aaad870cbd80ae0d08247ebc663476446ff':
  cdg: Forward error from avio_size() in read_header() function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 01:03:50 +02:00
Nidhi Makhijani
44386aaad8 cdg: Forward error from avio_size() in read_header() function
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-07-10 12:38:54 -07:00
Alexander V. Lukyanov
5adcef9c1b mpegts: pass MpegTSContext ptr explicitly
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.

Within libav, the write_section_data function doesn't actually use
the MpegTSContext at all, so this doesn't change anything at the
moment (no memory was corrupted before), but it reduces the risk of
anybody trying to touch the MpegTSContext via AVFormatContext->priv_data
in the future.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-07-10 11:24:19 +03:00
Nicolas Martyanoff
6cc1fec412 avformat/hlsenc: correctly compute target duration
With HLS, the duration of all segments must be lower or equal to the target
duration. Therefore floor(duration + 0.5) yields incorrect results.

For example, for duration = 1.35, floor(duration + 0.5) yields 1.0, but the
correct result is 2.0.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-07-10 01:31:04 +03:00
Michael Niedermayer
19b9e07ef5 Merge commit '0307cc2253e76772b1c645ac6117d08da87a147c'
* commit '0307cc2253e76772b1c645ac6117d08da87a147c':
  rtpdec: pass an AVFormatContext to ff_parse_fmtp()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 23:40:13 +02:00
Michael Niedermayer
f233666880 Merge commit '650d384048ed42579cc6d67bf32a94b468c0b6cb'
* commit '650d384048ed42579cc6d67bf32a94b468c0b6cb':
  yuv4mpegenc: do not access AVCodecContext.coded_frame

Conflicts:
	libavformat/yuv4mpegenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 23:34:33 +02:00
Michael Niedermayer
57fa9e9742 Merge commit '27c1f82f561932c83191bcd3e70e0cb1712485ba'
* commit '27c1f82f561932c83191bcd3e70e0cb1712485ba':
  nsvdec: remove commented out cruft

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 23:26:18 +02:00
Michael Niedermayer
73b1283012 Merge commit 'edb1af7c466ebb28bfdb0c076e498e527b43d24f'
* commit 'edb1af7c466ebb28bfdb0c076e498e527b43d24f':
  mov: free the dv demux context with avformat_free_context()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 23:19:06 +02:00
Michael Niedermayer
81babc432a Merge commit 'a14b61658c3302081ea5da3ea65b7d9f7b4fb2eb'
* commit 'a14b61658c3302081ea5da3ea65b7d9f7b4fb2eb':
  mtv: do not set sample_rate for video

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 23:11:09 +02:00
Michael Niedermayer
d52f874c7f Merge commit 'b8604a976128ffbd316653cdec11ba487f1025bb'
* commit 'b8604a976128ffbd316653cdec11ba487f1025bb':
  oggparsecelt: do not set AVCodecContext.frame_size

Conflicts:
	libavformat/oggparsecelt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 22:48:25 +02:00
Michael Niedermayer
e932ae5940 Merge commit 'd5cf5afabbf43f00283e70b12afbe1da030d85b6'
* commit 'd5cf5afabbf43f00283e70b12afbe1da030d85b6':
  adxdec: get rid of an avpriv function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 22:38:13 +02:00
Michael Niedermayer
1b58f13761 Merge commit 'f6ee61fb05482c617f5deee29a190d8ff483b3d1'
* commit 'f6ee61fb05482c617f5deee29a190d8ff483b3d1':
  lavc: export DV profile API used by muxer/demuxer as public

Conflicts:
	configure
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/dv_profile.c
	libavcodec/dv_profile.h
	libavcodec/version.h
	libavformat/dvenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 22:27:07 +02:00
Michael Niedermayer
4b13ec69c6 Merge commit 'c9c1265c52910578d3db1a6205c85b91ead0903f'
* commit 'c9c1265c52910578d3db1a6205c85b91ead0903f':
  avformat: update muxing doxy

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 21:38:27 +02:00
Michael Niedermayer
714d9bd6ee Merge commit 'abda15a990527557c20848f6ca2f82eb85e76dc9'
* commit 'abda15a990527557c20848f6ca2f82eb85e76dc9':
  cdg: set the keyframe flag on the first packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 21:30:45 +02:00
Michael Niedermayer
b83e0903ec avformat/m4vdec: raise threshold slightly for detection
Fixes Ticket3746

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 17:02:34 +02:00
Anton Khirnov
0307cc2253 rtpdec: pass an AVFormatContext to ff_parse_fmtp()
Use it for logging, instead of NULL or the stream codec context.
2014-07-09 13:40:54 +00:00
Anton Khirnov
650d384048 yuv4mpegenc: do not access AVCodecContext.coded_frame
Its contents are meaningful only if the stream codec context is the one
actually used for encoding, which is often not the case (and is
discouraged).

Use AVCodecContext.field_order instead.
2014-07-09 13:40:39 +00:00
Anton Khirnov
27c1f82f56 nsvdec: remove commented out cruft 2014-07-09 13:38:54 +00:00
Anton Khirnov
edb1af7c46 mov: free the dv demux context with avformat_free_context() 2014-07-09 13:38:35 +00:00
Anton Khirnov
a14b61658c mtv: do not set sample_rate for video 2014-07-09 13:38:26 +00:00