Commit Graph

13 Commits

Author SHA1 Message Date
Vignesh Venkatasubramanian 30ba28fe8e webmdashenc: Fix potential memory leak
Fix potential memory leak in WebM DASH Muxer. This fixes coverity
scan CID 1295088.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-21 01:12:27 +02:00
Vignesh Venkatasubramanian 1c37848f90 webmdashenc: Add better error handling
Return appropriate error codes and propagate the error codes from
helper functions to the outer calls. Also fix a potential leak in
call to av_realloc.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-17 04:48:29 +02:00
Vignesh Venkatasubramanian 30e2f87d2e webdashenc: replace unchecked av_malloc with stack allocation
Replace an unchecked av_malloc call with stack allocation as the size
is always a constant.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 20:48:30 +02:00
Vignesh Venkatasubramanian d6bb82387c webmdashenc: Fix fate in MSVC
MSVC does not support the %F and %T format specifiers in strftime.
Replace that with the expanded version. This fixes the broken fate
tests in MSVC (webm-dash-manifest-*).

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-07 21:29:20 +02:00
Vignesh Venkatasubramanian 26f2e2f3f7 webmdashenc: Support for live stream manifests
This patch adds support for creating DASH manifests for WebM Live
Streams. It also updates the documentation and adds a fate test to
verify the behavior of the new muxer flag.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 02:08:55 +02:00
Michael Niedermayer 5b911f1d5b avformat/webmdashenc: use AVERROR(ENOMEM) for memory allocation failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-01 18:11:48 +02:00
Vignesh Venkatasubramanian 597d826123 lavf/webmdashenc: Representation IDs should be unique.
According to the DASH spec, Representation IDs should be unique
across all adaptation sets. Fixing that and updating the fate
reference file to reflect this change.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-12 00:21:37 +01:00
Vignesh Venkatasubramanian a9b10e1510 lavf/webm_dash: some fields should go into Representation
Width, Height and Sample Rate should be in the AdaptationSet tag
only if all the contained representations have the same width,
height and sampling rate. Otherwise they should go into the
Representation tag. This patch adds this functionality and a fate
test for the same.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 19:20:05 +02:00
Carl Eugen Hoyos 7c3ba1b83a Add a closing LF to Webm-manifest files.
Fixes fate-webm-dash-manifest on AIX.

Reviewed-by: Nicolas George
2014-09-16 17:24:56 +02:00
Michael Niedermayer 72732f2ddd avformat/webmdashenc: use av_strlcpy() and allocate enough space
Fixes out of array read

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-29 13:02:34 +02:00
Michael Niedermayer 81a663f49e Drop remaining unneeded != NULL
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 22:47:45 +02:00
Michael Niedermayer fb33bff990 Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39':
  cosmetics: Write NULL pointer equality checks more compactly

Conflicts:
	cmdutils.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/dvbsub.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/dxa.c
	libavcodec/libxvid_rc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/rv10.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/zmbv.c
	libavdevice/v4l2.c
	libavformat/matroskadec.c
	libavformat/movenc.c
	libavformat/sdp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:00:50 +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