Message ID | 20170706182842.7785-3-derek.buitenhuis@gmail.com |
---|---|
State | New |
Headers | show |
2017-07-07 2:28 GMT+08:00 Derek Buitenhuis <derek.buitenhuis@gmail.com>: > Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> > --- > libavformat/hdsenc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c > index 347df83a51..c362a75d8b 100644 > --- a/libavformat/hdsenc.c > +++ b/libavformat/hdsenc.c > @@ -421,6 +421,7 @@ static int hds_write_header(AVFormatContext *s) > av_log(s, AV_LOG_WARNING, > "No video stream in output stream %d and no min frag duration set\n", i); > ret = AVERROR(EINVAL); > + goto fail; Maybe there have no video stream, but have audio stream, so just give user a warning and continue? > } > os->fragment_index = 1; > write_abst(s, os, 0); > -- > 2.11.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
On 7/6/2017 11:38 PM, Steven Liu wrote: > Maybe there have no video stream, but have audio stream, so just give > user a warning and continue? Not an expert on the HDS code, but how can you fragment audio with no min frag size set, and no video stream? - Derek
On Thu, Jul 06, 2017 at 07:28:32PM +0100, Derek Buitenhuis wrote: > Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> > --- > libavformat/hdsenc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c > index 347df83a51..c362a75d8b 100644 > --- a/libavformat/hdsenc.c > +++ b/libavformat/hdsenc.c > @@ -421,6 +421,7 @@ static int hds_write_header(AVFormatContext *s) > av_log(s, AV_LOG_WARNING, > "No video stream in output stream %d and no min frag duration set\n", i); > ret = AVERROR(EINVAL); > + goto fail; If this is applied then the av_log level should be changed from AV_LOG_WARNING to AV_LOG_ERROR without checking history, the warning makes me think it was intended to not fail [...]
diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index 347df83a51..c362a75d8b 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -421,6 +421,7 @@ static int hds_write_header(AVFormatContext *s) av_log(s, AV_LOG_WARNING, "No video stream in output stream %d and no min frag duration set\n", i); ret = AVERROR(EINVAL); + goto fail; } os->fragment_index = 1; write_abst(s, os, 0);
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> --- libavformat/hdsenc.c | 1 + 1 file changed, 1 insertion(+)