[FFmpeg-devel] [PATCH 1/2] webmdashenc: Require the 'adaptation_sets' option to be ste

Michael Niedermayer michael at niedermayer.cc
Thu Apr 20 19:10:09 EEST 2017


On Thu, Apr 20, 2017 at 12:58:54PM -0300, James Almer wrote:
> On 4/20/2017 9:14 AM, Derek Buitenhuis wrote:
> >This seems to be non-optional, and if the muxer is run without it,
> >strlen() is run on NULL, causing a segfault.
> >
> >Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> >---
> >  libavformat/webmdashenc.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> >diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
> >index 602726c..2f5c31e 100644
> >--- a/libavformat/webmdashenc.c
> >+++ b/libavformat/webmdashenc.c
> >@@ -433,6 +433,10 @@ static int parse_adaptation_sets(AVFormatContext *s)
> >      char *p = w->adaptation_sets;
> >      char *q;
> >      enum { new_set, parsed_id, parsing_streams } state;
> >+    if (!(w->adaptation_sets)) {
> >+        av_log(s, AV_LOG_ERROR, "The 'adaptation_sets' option must be set.\n");
> >+        return AVERROR_INVALIDDATA;
> 
> EINVAL IMO, since it's an user option.

this applies to both pathes
changed before applying


> 
> A non-optional user setting that has no default is in any case weird.
> Usually, the user expects a ffmpeg -i INPUT OUTPUT to work even if
> the result is of low quality.
> 
> >+    }
> >      // syntax id=0,streams=0,1,2 id=1,streams=3,4 and so on
> >      state = new_set;
> >      while (p < w->adaptation_sets + strlen(w->adaptation_sets)) {
> >
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you fake or manipulate statistics in a paper in physics you will never
get a job again.
If you fake or manipulate statistics in a paper in medicin you will get
a job for life at the pharma industry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170420/43cc66a9/attachment.sig>


More information about the ffmpeg-devel mailing list