1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

55 Commits

Author SHA1 Message Date
wm4
f5da453b06 concatdec: pass AVFormatContext flags to sub demuxer 2017-03-09 16:24:00 +01:00
raymondzheng1412@gmail.com
2366efce3c avformat/concatdec: don't call open_file when seek position within a file 2016-09-28 20:31:22 +02:00
Nicolas George
0cb19c30c6 lavf/concatdec: clear extradata when inserting h264_mp4toannexb bsf.
Fix remuxing H.264-in-MP4 to Matroska, possibly others.
2016-04-26 16:58:59 +02:00
Nicolas George
b8fa374fb6 lavf/concatdec: remove unrelated change during codecpar merge.
Clearing the extradata is not related to the codecpar change,
and it breaks if auto_convert is disabled.

Fix trac ticket #5461.
2016-04-26 16:58:59 +02:00
Timo Rothenpieler
901b0f1a21 avformat/concatdec: Use correct stream count on close 2016-04-11 21:06:10 +02:00
Derek Buitenhuis
6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Michael Niedermayer
689211d572 avformat/concatdec: set safe mode to enabled instead of auto
This is safer, as a selected demuxer could still mean that it was auto-detected
by a user application

Reviewed-previously-by: Nicolas George <george@nsup.org>
Reviewed-previously-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-10 02:54:59 +01:00
Derek Buitenhuis
93629735d7 avformat: Add a protocol blacklisting API
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-03-04 16:13:42 +00:00
Marton Balint
fdb2d4b108 lavf/concatdec: do not access packet if av_read_frame returned error
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-01-10 14:13:16 +01:00
Clément Bœsch
43ecec0f03 avformat: use AV_OPT_TYPE_BOOL in a bunch of places 2015-12-04 15:43:33 +01:00
Marton Balint
65406b0bed concatdec: add option for adding segment start time and duration metadata
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-25 00:34:29 +01:00
Marton Balint
ba9191ab3a concatdec: simplify duration calculation in open_next_file
If duration is still AV_NOPTS_VALUE when opening the next file, we can assume
that outpoint is not set.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-25 00:34:29 +01:00
Marton Balint
8f60663c8b concatdec: calculate duration early if outpoint is known
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-25 00:34:29 +01:00
Hendrik Leppkes
c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Marton Balint
df239b7619 concatdec: fix file_start_time calculation regression
Fixes ticket #4924.

Found-by: Jaroslav Šnajdr <jsnajdr@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-10-17 18:38:52 +02:00
Marton Balint
80b6cc4214 concatdec: fix metadata memleak on error
Fixes Coverity CID 1323077.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-10-05 00:16:12 +02:00
Michael Niedermayer
9f6ca28e32 avformat/concatdec: Check file variable before dereferencing
Fixes CID1322328

Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 18:53:44 +02:00
Marton Balint
0860016529 concatdec: fix broken file_inpoint calculation
Should fix ticket #4765.

Signed-off-by: Marton Balint <cus@passwd.hu>
2015-08-11 11:19:17 +02:00
Marton Balint
5117b5e9aa concatdec: add support for injecting packet metadata
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-07-17 00:12:04 +02:00
Marton Balint
25a6711c25 concatdec: add support for specifying outpoint of files
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-07-17 00:12:04 +02:00
Marton Balint
12d82004c5 concatdec: store eof condition in context
This is needed later for outpoint support which may leave the last file in a
not-eof state.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-07-17 00:12:04 +02:00
Marton Balint
7ff0137a1f concatdec: add support for specifying inpoint of files
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-07-17 00:12:04 +02:00
Vadim Belov
db64af6395 avformat/concatdec: copy stream metadata when using concat
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-01 14:43:31 +02:00
Michael Niedermayer
3331213e2a avformat/concatdec: Enable auto_convert by default
Users have no means to find out from a failure how to make it work
or is it preferred to check and print a warning for h264 concat without auto_convert ?

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 12:19:47 +02:00
Zhang Rui
038f3a173f avformat/concatdec: avoid NULL dereference when failed to open file.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-29 14:25:04 +01:00
Nicolas George
acbc2ed26a lavf/concatdec: handle NOPTS start_time.
Fix trac ticket #3598.

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-15 20:00:35 +01:00
Stefano Sabatini
484d42a097 lavf/concatdec: add timestamp log
Help debugging timestamp conversion issues.
2014-11-19 11:17:43 +01:00
Michael Niedermayer
4641ae352e avformat: Add and use ff_copy_whitelists()
Fixes potential security issue in case of running out of memory

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-24 19:23:23 +02:00
Michael Niedermayer
5ea0753a15 avformat/concatdec: Forward whitelists to the subdemuxers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-23 18:19:37 +02:00
Michael Niedermayer
3294fc8c47 avformat/concatdec: fix "warning: explicitly assigning a variable of type int to itself"
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-10 11:48:39 +02:00
Nicolas George
50ed6e3ce6 lavf/concatdec: implement automatic conversions. 2014-04-29 13:25:59 +02:00
Nicolas George
9d24a536a3 lavf/concatdec: reindent after last commit. 2014-04-29 13:25:59 +02:00
Nicolas George
b24d6c5303 lavf/concatdec: always do stream matching. 2014-04-29 13:25:59 +02:00
Nicolas George
c27939d871 lavf/concatdec: check match_streams() return value. 2014-04-29 13:25:59 +02:00
Nicolas George
e973cf04f6 lavf/concatdec: use a structure for each stream. 2014-04-29 13:25:59 +02:00
Nicolas George
26dea7731e lavf/concatdec: allow to match streams by id.
That makes the concat demuxer usable with MPEG-PS streams,
even when the streams in the different parts are detected
in different order.
2014-03-23 19:15:07 +01:00
Nicolas George
6bffa83bbe lavf/concatdec: reindent after last commit. 2014-03-08 12:44:45 +01:00
Nicolas George
8a670f52a5 lavf/concatdec: more reliable test for absolute URLs.
ff_make_absolute_url() recognizes the "://" pattern usual
in HTTP-like protocols, but consider relative URLs starting
with just the protocol name or using the comma syntax for
options.
2014-03-08 12:38:31 +01:00
Zhang Rui
4958628ba6 avformat/concatdec: pass the interrupt callback on
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-10 15:42:48 +01:00
Stefano Sabatini
aeccb522eb lavf/concatdec: fix crash in case a file in script cannot be opened 2013-12-18 15:14:58 +01:00
Michael Niedermayer
1f87cbe834 Merge commit 'df9f22d42b0905385629a9d368bb5a1eef2b45ef'
* commit 'df9f22d42b0905385629a9d368bb5a1eef2b45ef':
  avf: move url utility functions in a separate file

Conflicts:
	libavformat/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-17 00:09:31 +02:00
Nicolas George
ca2f6b6932 lavf/concat: reject empty scripts.
Fix trac ticket #2566.
2013-05-15 16:53:35 +02:00
Nicolas George
d608a27d9e lavf/concatdec: remove invalid check for AVSEEK_FLAG_BACKWARD. 2013-05-04 14:11:53 +02:00
Nicolas George
de1a71595d lavf/concatdec: support seeking. 2013-03-20 20:59:24 +01:00
Nicolas George
de1568a452 lavf/concatdec: fix possible leak in case of malloc failure.
Fix CID 747737.
2013-03-20 13:35:24 +01:00
Nicolas George
c31458c334 lavf/concat: compute duration if possible. 2013-03-05 16:44:51 +01:00
Nicolas George
3ab25e4574 Revert "lavf/concatdec: define "ffcat" and "ffconcat" extensions"
This reverts commit 6cc12353a8.

Conflicts:
	libavformat/version.h

Allowing to automatically select the concat demuxer raises
security concerns, as it allows a possibly hostile file to
access any file on the system. Guessing the format based on
the file name extension does not allow to enable the safe
mode designed to avoid it.
2013-03-05 14:10:10 +01:00
Stefano Sabatini
6cc12353a8 lavf/concatdec: define "ffcat" and "ffconcat" extensions 2013-02-28 00:16:33 +01:00
Nicolas George
ea2de3d096 lavf/concatdec: add the "duration" directive. 2013-02-24 13:12:46 +01:00
Nicolas George
b68dd8a161 lavf/concatdec: allow probing. 2013-02-13 14:58:50 +01:00