Re: [FFmpeg-devel] [PATCH] avfilter: add bm3d filter
On 5/13/18, Michael Niedermayer wrote: > On Sat, May 12, 2018 at 09:04:44AM +0200, Paul B Mahol wrote: >> On 5/12/18, Michael Niedermayer wrote: >> > On Fri, May 11, 2018 at 04:03:07PM +0200, Paul B Mahol wrote: >> >> Signed-off-by: Paul B Mahol >> >> --- >> >> libavfilter/Makefile |1 + >> >> libavfilter/allfilters.c |1 + >> >> libavfilter/vf_bm3d.c| 1002 >> >> ++ >> >> 3 files changed, 1004 insertions(+) >> >> create mode 100644 libavfilter/vf_bm3d.c >> > [...] >> >> +static void block_matching_multi(BM3DContext *s, const uint8_t *ref, >> >> int >> >> ref_linesize, int y, int x, >> >> + int exclude_cur_pos, int plane) >> >> +{ >> >> +const int width = s->planewidth[plane]; >> >> +const int height = s->planeheight[plane]; >> >> +const int block_size = s->block_size; >> >> +const int step = s->bm_step; >> >> +const int range = s->bm_range / step * step; >> >> +int l = search_boundary(0, range, step, 0, y, x); >> >> +int r = search_boundary(width - block_size, range, step, 0, y, >> >> x); >> >> +int t = search_boundary(0, range, step, 1, y, x); >> >> +int b = search_boundary(height - block_size, range, step, 1, y, >> >> x); >> >> +int j, i, index = 0; >> >> + >> >> +PosCode search_pos[((r - l) / step + 1) * ((b - t) / step + 1)]; >> > >> > fails to build here: >> > >> > src/libavfilter/vf_bm3d.c: In function `block_matching_multi': >> > src/libavfilter/vf_bm3d.c:308:5: error: variable length array >> > `search_pos' >> > is used [-Werror=vla] >> > PosCode search_pos[((r - l) / step + 1) * ((b - t) / step + 1)]; >> > ^ >> >> Come on! Your compiler still live under the rock, doesn't it? > > It lives under the -Werror=vla flag added by configure > I wonder why your compiler ignores it I removed VLA in lastest patch if you hadn't noticed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] flvenc: Fix sequence header update timestamps
On Fri, May 11, 2018 at 4:40 AM, Alex Converse wrote: > From: Alex Converse > > --- > libavformat/flvenc.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c > index 9b7cdfe7db..7aa2dbf9a6 100644 > --- a/libavformat/flvenc.c > +++ b/libavformat/flvenc.c > @@ -485,7 +485,7 @@ static int unsupported_codec(AVFormatContext *s, > return AVERROR(ENOSYS); > } > > -static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* > par) { > +static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* > par, unsigned ts) { > int64_t data_size; > AVIOContext *pb = s->pb; > FLVContext *flv = s->priv_data; > @@ -497,8 +497,7 @@ static void flv_write_codec_header(AVFormatContext* s, > AVCodecParameters* par) { > par->codec_type == AVMEDIA_TYPE_VIDEO ? > FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO); > avio_wb24(pb, 0); // size patched later > -avio_wb24(pb, 0); // ts > -avio_w8(pb, 0); // ts ext > +put_timestamp(pb, ts); > avio_wb24(pb, 0); // streamid > pos = avio_tell(pb); > if (par->codec_id == AV_CODEC_ID_AAC) { > @@ -761,7 +760,7 @@ static int flv_write_header(AVFormatContext *s) > } > > for (i = 0; i < s->nb_streams; i++) { > -flv_write_codec_header(s, s->streams[i]->codecpar); > +flv_write_codec_header(s, s->streams[i]->codecpar, 0); > } > > flv->datastart_offset = avio_tell(pb); > @@ -905,7 +904,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket > *pkt) > } > memcpy(par->extradata, side, side_size); > par->extradata_size = side_size; > -flv_write_codec_header(s, par); > +flv_write_codec_header(s, par, (unsigned)pkt->dts); > } > } > Yes, this will get rid of the possible warning by casting, but you're still dealing with system specifically sized variables, so you might be doing int64_t ->uint64_t or int64_t->uint32_t. I have no idea why the aversion of just using the same type in `flv_write_codec_header` as what the DTS is (int64_t)? And why are we completely ignoring the fact that FLV has timestamp wrap-arounds? Or does this update header not care about that? Best regards, Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] flvenc: Fix sequence header update timestamps
On Sun, May 13, 2018 at 12:25 PM, Jan Ekström wrote: > On Fri, May 11, 2018 at 4:40 AM, Alex Converse > wrote: >> From: Alex Converse >> >> --- >> libavformat/flvenc.c | 9 - >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c >> index 9b7cdfe7db..7aa2dbf9a6 100644 >> --- a/libavformat/flvenc.c >> +++ b/libavformat/flvenc.c >> @@ -485,7 +485,7 @@ static int unsupported_codec(AVFormatContext *s, >> return AVERROR(ENOSYS); >> } >> >> -static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* >> par) { >> +static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* >> par, unsigned ts) { >> int64_t data_size; >> AVIOContext *pb = s->pb; >> FLVContext *flv = s->priv_data; >> @@ -497,8 +497,7 @@ static void flv_write_codec_header(AVFormatContext* s, >> AVCodecParameters* par) { >> par->codec_type == AVMEDIA_TYPE_VIDEO ? >> FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO); >> avio_wb24(pb, 0); // size patched later >> -avio_wb24(pb, 0); // ts >> -avio_w8(pb, 0); // ts ext >> +put_timestamp(pb, ts); >> avio_wb24(pb, 0); // streamid >> pos = avio_tell(pb); >> if (par->codec_id == AV_CODEC_ID_AAC) { >> @@ -761,7 +760,7 @@ static int flv_write_header(AVFormatContext *s) >> } >> >> for (i = 0; i < s->nb_streams; i++) { >> -flv_write_codec_header(s, s->streams[i]->codecpar); >> +flv_write_codec_header(s, s->streams[i]->codecpar, 0); >> } >> >> flv->datastart_offset = avio_tell(pb); >> @@ -905,7 +904,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket >> *pkt) >> } >> memcpy(par->extradata, side, side_size); >> par->extradata_size = side_size; >> -flv_write_codec_header(s, par); >> +flv_write_codec_header(s, par, (unsigned)pkt->dts); >> } >> } >> > > Yes, this will get rid of the possible warning by casting, but you're > still dealing with system specifically sized variables, so you might > be doing int64_t ->uint64_t or int64_t->uint32_t. > > I have no idea why the aversion of just using the same type in > `flv_write_codec_header` as what the DTS is (int64_t)? And why are we > completely ignoring the fact that FLV has timestamp wrap-arounds? Or > does this update header not care about that? > > Best regards, > Jan Hi, OK, seemingly I'm the bad guy here and all such technical issues in new code (including old modules) should just be ignored if it's just copying stuff from the same place that is not fit for our coding standards. My original intention was to make sure that Alex's patch doesn't get ignored and that it could have a nice review which could be handled in a single or two iterations by looking into how FLV works and fixing up some minor things like the int64_t->unsigned case. My idea was not to fix other parts of flvenc, but just at the very least getting the information on how to fix it fully afterwards if indeed some copied code seemingly did things incorrectly, and just making this part as an example of how to do that in the future. And now it seems like these intentions went the wrong way, and most of the people on IRC seem to say that since this same way was used in flvenc before (int64_t->unsigned), it could be used again in newly added code. OK, I will not be a nuisance in this thread any more and any technical notes I made here can be considered moot since I seem to have come out as just being an asshole to Alex. I am sorry. That was never my intention. Best regards, Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] flvenc: Fix sequence header update timestamps
On Thu, May 10, 2018 at 06:40:08PM -0700, Alex Converse wrote: > From: Alex Converse > > --- > libavformat/flvenc.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c > index 9b7cdfe7db..7aa2dbf9a6 100644 > --- a/libavformat/flvenc.c > +++ b/libavformat/flvenc.c > @@ -485,7 +485,7 @@ static int unsupported_codec(AVFormatContext *s, > return AVERROR(ENOSYS); > } > > -static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* > par) { > +static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* > par, unsigned ts) { It seems jeeb prefers int64_t here instead of unsigned. Can you change that before pushing ? Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/flvenc: Avoid truncating timestamp before avio_write_marker()
Signed-off-by: Michael Niedermayer --- libavformat/flvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index e8af48cb64..168ff9ffb8 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -873,7 +873,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar; FLVContext *flv = s->priv_data; FLVStreamContext *sc = s->streams[pkt->stream_index]->priv_data; -unsigned ts; +int64_t ts; int size = pkt->size; uint8_t *data = NULL; int flags = -1, flags_size, ret; -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
From: Niklas Haas This should be included as ``, same as is done in af_lv2.c. Forcing the extra lilv-0 breaks platforms where the include dir is `/usr/include/lilv/lilv.h` rather than `/usr/include/lilv-0/lilv/lilv.h`. The new include path works for both, because the `pkg-config --cflags` includes `-I/usr/include/lilv-0`. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index a1f13a7109..451d1937b7 100755 --- a/configure +++ b/configure @@ -5973,7 +5973,7 @@ enabled gnutls&& require_pkg_config gnutls gnutls gnutls/gnutls.h gn enabled jni && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads || die "ERROR: jni not found"; } enabled ladspa&& require_header ladspa.h enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" aom/aom_codec.h aom_codec_version -enabled lv2 && require_pkg_config lv2 lilv-0 "lilv-0/lilv/lilv.h" lilv_world_new +enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 enabled libass&& require_pkg_config libass libass ass/ass.h ass_library_init enabled libbluray && require_pkg_config libbluray libbluray libbluray/bluray.h bd_open -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
On Sun, May 13, 2018 at 6:07 PM, Niklas Haas wrote: > From: Niklas Haas > > This should be included as ``, same as is done in af_lv2.c. > Forcing the extra lilv-0 breaks platforms where the include dir is > `/usr/include/lilv/lilv.h` rather than > `/usr/include/lilv-0/lilv/lilv.h`. > > The new include path works for both, because the `pkg-config --cflags` > includes `-I/usr/include/lilv-0`. > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index a1f13a7109..451d1937b7 100755 > --- a/configure > +++ b/configure > @@ -5973,7 +5973,7 @@ enabled gnutls&& require_pkg_config gnutls > gnutls gnutls/gnutls.h gn > enabled jni && { [ $target_os = "android" ] && check_header > jni.h && enabled pthreads || die "ERROR: jni not found"; } > enabled ladspa&& require_header ladspa.h > enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" > aom/aom_codec.h aom_codec_version > -enabled lv2 && require_pkg_config lv2 lilv-0 > "lilv-0/lilv/lilv.h" lilv_world_new > +enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" > lilv_world_new > enabled libiec61883 && require libiec61883 libiec61883/iec61883.h > iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 > enabled libass&& require_pkg_config libass libass ass/ass.h > ass_library_init > enabled libbluray && require_pkg_config libbluray libbluray > libbluray/bluray.h bd_open > -- > 2.17.0 > Generally looks good, CC'ing Paul so he can verify that it still builds for him as well. Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
On 5/13/18, Niklas Haas wrote: > From: Niklas Haas > > This should be included as ``, same as is done in af_lv2.c. > Forcing the extra lilv-0 breaks platforms where the include dir is > `/usr/include/lilv/lilv.h` rather than > `/usr/include/lilv-0/lilv/lilv.h`. > > The new include path works for both, because the `pkg-config --cflags` > includes `-I/usr/include/lilv-0`. > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
On 5/13/18, Jan Ekstroem wrote: > On Sun, May 13, 2018 at 6:07 PM, Niklas Haas wrote: >> From: Niklas Haas >> >> This should be included as ``, same as is done in af_lv2.c. >> Forcing the extra lilv-0 breaks platforms where the include dir is >> `/usr/include/lilv/lilv.h` rather than >> `/usr/include/lilv-0/lilv/lilv.h`. >> >> The new include path works for both, because the `pkg-config --cflags` >> includes `-I/usr/include/lilv-0`. >> --- >> configure | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/configure b/configure >> index a1f13a7109..451d1937b7 100755 >> --- a/configure >> +++ b/configure >> @@ -5973,7 +5973,7 @@ enabled gnutls&& require_pkg_config >> gnutls gnutls gnutls/gnutls.h gn >> enabled jni && { [ $target_os = "android" ] && check_header >> jni.h && enabled pthreads || die "ERROR: jni not found"; } >> enabled ladspa&& require_header ladspa.h >> enabled libaom&& require_pkg_config libaom "aom >= 0.1.0" >> aom/aom_codec.h aom_codec_version >> -enabled lv2 && require_pkg_config lv2 lilv-0 >> "lilv-0/lilv/lilv.h" lilv_world_new >> +enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" >> lilv_world_new >> enabled libiec61883 && require libiec61883 libiec61883/iec61883.h >> iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 >> enabled libass&& require_pkg_config libass libass ass/ass.h >> ass_library_init >> enabled libbluray && require_pkg_config libbluray libbluray >> libbluray/bluray.h bd_open >> -- >> 2.17.0 >> > > Generally looks good, CC'ing Paul so he can verify that it still > builds for him as well. Why are you CCing me? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol wrote: > On 5/13/18, Niklas Haas wrote: >> From: Niklas Haas >> >> This should be included as ``, same as is done in af_lv2.c. >> Forcing the extra lilv-0 breaks platforms where the include dir is >> `/usr/include/lilv/lilv.h` rather than >> `/usr/include/lilv-0/lilv/lilv.h`. >> >> The new include path works for both, because the `pkg-config --cflags` >> includes `-I/usr/include/lilv-0`. >> --- >> configure | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> > > lgtm Thank you. Pushed in. Should this be back-ported to release/4.0 as well? Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa
On 7-5-2018 17:59, Reino Wijnsma wrote: > From 8082ba451d089790f0719c4ec6788796b2079e9d Mon Sep 17 00:00:00 2001 > From: Reino17 > Date: Mon, 7 May 2018 17:28:10 +0200 > Subject: [PATCH] configure: add pkg-config check for libmysofa > > This does require libmysofa with today's latest commit > (https://github.com/hoene/libmysofa/commit/08f243d1ec35f6f794aedeb4b187d9f9353bdbc1). > They already had a pkg-config file, but the dependencies weren't setup right. > Until now. > --- > configure | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index 7c14323..2d61731 100755 > --- a/configure > +++ b/configure > @@ -6007,7 +6007,8 @@ enabled libmfx&& { check_pkg_config libmfx > libmfx "mfx/mfxvideo.h" M > { require libmfx "mfx/mfxvideo.h" MFXInit > "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } } > enabled libmodplug&& require_pkg_config libmodplug libmodplug > libmodplug/modplug.h ModPlug_Load > enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h > lame_set_VBR_quality -lmp3lame $libm_extralibs > -enabled libmysofa && require libmysofa "mysofa.h" mysofa_load > -lmysofa $zlib_extralibs > +enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h > mysofa_load || > + require libmysofa mysofa.h mysofa_load > -lmysofa $zlib_extralibs; } > enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion > -lnppig -lnppicc -lnppc || > check_lib libnpp npp.h nppGetLibVersion > -lnppi -lnppc || > die "ERROR: libnpp not found"; } *ping* ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa
On 5/13/18, Reino Wijnsma wrote: > On 7-5-2018 17:59, Reino Wijnsma wrote: >> From 8082ba451d089790f0719c4ec6788796b2079e9d Mon Sep 17 00:00:00 2001 >> From: Reino17 >> Date: Mon, 7 May 2018 17:28:10 +0200 >> Subject: [PATCH] configure: add pkg-config check for libmysofa >> >> This does require libmysofa with today's latest commit >> (https://github.com/hoene/libmysofa/commit/08f243d1ec35f6f794aedeb4b187d9f9353bdbc1). >> They already had a pkg-config file, but the dependencies weren't setup >> right. Until now. >> --- >> configure | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/configure b/configure >> index 7c14323..2d61731 100755 >> --- a/configure >> +++ b/configure >> @@ -6007,7 +6007,8 @@ enabled libmfx&& { check_pkg_config >> libmfx libmfx "mfx/mfxvideo.h" M >> { require libmfx "mfx/mfxvideo.h" MFXInit >> "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; >> } } >> enabled libmodplug&& require_pkg_config libmodplug libmodplug >> libmodplug/modplug.h ModPlug_Load >> enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h >> lame_set_VBR_quality -lmp3lame $libm_extralibs >> -enabled libmysofa && require libmysofa "mysofa.h" mysofa_load >> -lmysofa $zlib_extralibs >> +enabled libmysofa && { check_pkg_config libmysofa libmysofa >> mysofa.h mysofa_load || >> + require libmysofa mysofa.h mysofa_load >> -lmysofa $zlib_extralibs; } >> enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion >> -lnppig -lnppicc -lnppc || >> check_lib libnpp npp.h nppGetLibVersion >> -lnppi -lnppc || >> die "ERROR: libnpp not found"; } > *ping* Could you wait for new libmysofa release? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
On 5/13/18, Jan Ekstroem wrote: > On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol wrote: >> On 5/13/18, Niklas Haas wrote: >>> From: Niklas Haas >>> >>> This should be included as ``, same as is done in af_lv2.c. >>> Forcing the extra lilv-0 breaks platforms where the include dir is >>> `/usr/include/lilv/lilv.h` rather than >>> `/usr/include/lilv-0/lilv/lilv.h`. >>> >>> The new include path works for both, because the `pkg-config --cflags` >>> includes `-I/usr/include/lilv-0`. >>> --- >>> configure | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >> >> lgtm > > Thank you. Pushed in. > > Should this be back-ported to release/4.0 as well? If you care. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa
On Sun, May 13, 2018 at 7:11 PM, Paul B Mahol wrote: > On 5/13/18, Reino Wijnsma wrote: >> *ping* > > Could you wait for new libmysofa release? Hi, I think this depends on whether this breaks build where it used to work before. As you may notice, it still has the non-pkg-config fall-back. So if the test doesn't link (I think this check tests for linking?), it should revert to the non-pkg-config one. Unfortunately I do not have libmysofa installed so I cannot verify this myself, but it heavily looks like this actually is an overall improvement, esp. if they are not going to change the name of the pc file. Best regards, Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
On Sun, May 13, 2018 at 7:12 PM, Paul B Mahol wrote: > On 5/13/18, Jan Ekstroem wrote: >> On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol wrote: >>> On 5/13/18, Niklas Haas wrote: From: Niklas Haas This should be included as ``, same as is done in af_lv2.c. Forcing the extra lilv-0 breaks platforms where the include dir is `/usr/include/lilv/lilv.h` rather than `/usr/include/lilv-0/lilv/lilv.h`. The new include path works for both, because the `pkg-config --cflags` includes `-I/usr/include/lilv-0`. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> lgtm >> >> Thank you. Pushed in. >> >> Should this be back-ported to release/4.0 as well? > > If you care. You may say that I do not care, but I have this still vivid in my memory and I would guess you would like your filter to build better in releases as well. Best regards, Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: fix configure check for lilv-0
On Sun, May 13, 2018 at 7:12 PM, Paul B Mahol wrote: > On 5/13/18, Jan Ekstroem wrote: >> On Sun, May 13, 2018 at 6:52 PM, Paul B Mahol wrote: >>> On 5/13/18, Niklas Haas wrote: From: Niklas Haas This should be included as ``, same as is done in af_lv2.c. Forcing the extra lilv-0 breaks platforms where the include dir is `/usr/include/lilv/lilv.h` rather than `/usr/include/lilv-0/lilv/lilv.h`. The new include path works for both, because the `pkg-config --cflags` includes `-I/usr/include/lilv-0`. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> lgtm >> >> Thank you. Pushed in. >> >> Should this be back-ported to release/4.0 as well? > > If you care. And thus, back-ported to release/4.0. Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat/mpegts: parse sections with multiple tables
On 5/9/2018 6:35 PM, Aman Gupta wrote: > From: Aman Gupta > > Fixes PMT parsing in some mpegts streams which contain > multiple tables within the PMT pid. Previously, the parser > assumed only one table was present in each packet, and discarded > the rest of the section data after attempting to parse the first > table. > > A similar issue was documented in the BeyondTV software[1], which > helped me diagnose the same bug in the ffmpeg mpegts demuxer. I also > tried DVBInspector, libdvbpsi's dvbinfo, and tstools' tsinfo to > help debug. The former two properly read PMTs with multiple tables, > whereas the last has the same bug as ffmpeg. > > I've created a minimal sample[2] which contains the combined PMT. > Here's what ffmpeg probe shows before and after this patch: > > Before: > > Input #0, mpegts, from 'combined-pmt-tids.ts': > Duration: 00:00:01.08, start: 4932.966167, bitrate: 741 kb/s > Program 1 > No Program > Stream #0:0[0xf9d]: Audio: ac3, 48000 Hz, mono, fltp, 96 kb/s > Stream #0:1[0xf9b]: Audio: mp3, 0 channels, fltp > Stream #0:2[0xf9c]: Unknown: none > > After: > > Input #0, mpegts, from 'combined-pmt-tids.ts': > Duration: 00:00:01.11, start: 4932.966167, bitrate: 718 kb/s > Program 1 > Stream #0:0[0xf9b]: Video: mpeg2video ([2][0][0][0] / 0x0002), > none(tv, top first), 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc > Stream #0:1[0xf9c](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, > 5.1(side), fltp, 384 kb/s > Stream #0:2[0xf9d](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, > mono, fltp, 96 kb/s > > With the patch, the PMT is parsed correctly so the streams are > created in the correct order, are associated with "Program 1", > and their codecs are set correctly. > > [1] http://forums.snapstream.com/vb/showpost.php?p=343816&postcount=201 > [2] https://s3.amazonaws.com/tmm1/combined-pmt-tids.ts > > Signed-off-by: Aman Gupta > --- > libavformat/mpegts.c | 26 +++--- > 1 file changed, 19 insertions(+), 7 deletions(-) > > diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c > index 0d1dda1c36..3c9f9421cb 100644 > --- a/libavformat/mpegts.c > +++ b/libavformat/mpegts.c > @@ -391,7 +391,8 @@ static void write_section_data(MpegTSContext *ts, > MpegTSFilter *tss1, > const uint8_t *buf, int buf_size, int > is_start) > { > MpegTSSectionFilter *tss = &tss1->u.section_filter; > -int len; > +uint8_t *cur_section_buf = NULL; > +int len, offset; > > if (is_start) { > memcpy(tss->section_buf, buf, buf_size); > @@ -408,23 +409,26 @@ static void write_section_data(MpegTSContext *ts, > MpegTSFilter *tss1, > tss->section_index += len; > } > > +offset = 0; > +cur_section_buf = tss->section_buf; > +while (cur_section_buf - tss->section_buf < MAX_SECTION_SIZE && > cur_section_buf[0] != 0xff) { > /* compute section length if possible */ > -if (tss->section_h_size == -1 && tss->section_index >= 3) { > -len = (AV_RB16(tss->section_buf + 1) & 0xfff) + 3; > +if (tss->section_h_size == -1 && tss->section_index - offset >= 3) { > +len = (AV_RB16(cur_section_buf + 1) & 0xfff) + 3; > if (len > MAX_SECTION_SIZE) > return; > tss->section_h_size = len; > } > > if (tss->section_h_size != -1 && > -tss->section_index >= tss->section_h_size) { > +tss->section_index >= offset + tss->section_h_size) { > int crc_valid = 1; > tss->end_of_section_reached = 1; > > if (tss->check_crc) { > -crc_valid = !av_crc(av_crc_get_table(AV_CRC_32_IEEE), -1, > tss->section_buf, tss->section_h_size); > +crc_valid = !av_crc(av_crc_get_table(AV_CRC_32_IEEE), -1, > cur_section_buf, tss->section_h_size); > if (tss->section_h_size >= 4) > -tss->crc = AV_RB32(tss->section_buf + tss->section_h_size - > 4); > +tss->crc = AV_RB32(cur_section_buf + tss->section_h_size - > 4); > > if (crc_valid) { > ts->crc_validity[ tss1->pid ] = 100; > @@ -434,10 +438,18 @@ static void write_section_data(MpegTSContext *ts, > MpegTSFilter *tss1, > crc_valid = 2; > } > if (crc_valid) { > -tss->section_cb(tss1, tss->section_buf, tss->section_h_size); > +tss->section_cb(tss1, cur_section_buf, tss->section_h_size); > if (crc_valid != 1) > tss->last_ver = -1; > } > + > +cur_section_buf += tss->section_h_size; > +offset += tss->section_h_size; > +tss->section_h_size = -1; > +} else { > +tss->end_of_section_reached = 0; > +break; > +} > } > } Valgrind seems to complain about this change (Conditional jump or move depends on uninitialised value). http://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinu
Re: [FFmpeg-devel] [PATCH 1/1] configure: add pkg-config check for libmysofa
On 13-5-2018 18:11, Paul B Mahol wrote: > Could you wait for new libmysofa release? I'm not a FFmpeg coder/developer, so if you believe that's the best thing to do, then that's fine by me. The current non-pkg-config-file method works fine afterall. -- Reino ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/webm_chunk: always use a static buffer for get_chunk_filename
My conversation from AVFormatContext->filename to AVFormatContext->url was wrong in this case because get_chunk_filename uses filename as an output buffer, and not as an input buffer. Fixes ticket #7188. Signed-off-by: Marton Balint --- libavformat/webm_chunk.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index 549ec2879a..7ceb276fc4 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -114,6 +114,8 @@ static int webm_chunk_write_header(AVFormatContext *s) int ret; int i; AVDictionary *options = NULL; +char oc_filename[MAX_FILENAME_SIZE]; +char *oc_url; // DASH Streams can only have either one track per file. if (s->nb_streams != 1) { return AVERROR_INVALIDDATA; } @@ -127,9 +129,13 @@ static int webm_chunk_write_header(AVFormatContext *s) if (ret < 0) return ret; oc = wc->avf; -ret = get_chunk_filename(s, 1, oc->url); +ret = get_chunk_filename(s, 1, oc_filename); if (ret < 0) return ret; +oc_url = av_strdup(oc_filename); +if (!oc_url) +return AVERROR(ENOMEM); +ff_format_set_url(oc, oc_url); if (wc->http_method) av_dict_set(&options, "method", wc->http_method, 0); ret = s->io_open(s, &oc->pb, oc->url, AVIO_FLAG_WRITE, &options); -- 2.13.6 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0
Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); Fixes: 6500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-4523620274536448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/dirac_dwt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dirac_dwt.h b/libavcodec/dirac_dwt.h index 68ebd19560..994dc21d70 100644 --- a/libavcodec/dirac_dwt.h +++ b/libavcodec/dirac_dwt.h @@ -99,10 +99,10 @@ void ff_spatial_idwt_slice2(DWTContext *d, int y); (b1 + (unsigned)((int)(b0 + (unsigned)(b2) + 1) >> 1)) #define COMPOSE_DD97iH0(b0, b1, b2, b3, b4)\ -(int)(((unsigned)(b2) + ((int)(-b0 + 9U*b1 + 9U*b3 - b4 + 8) >> 4))) +(int)(((unsigned)(b2) + ((int)(9U*b1 + 9U*b3 - b4 - b0 + 8) >> 4))) #define COMPOSE_DD137iL0(b0, b1, b2, b3, b4)\ -(int)(((unsigned)(b2) - ((int)(-b0 + 9U*b1 + 9U*b3 - b4 + 16) >> 5))) +(int)(((unsigned)(b2) - ((int)(9U*b1 + 9U*b3 - b4 - b0 + 16) >> 5))) #define COMPOSE_HAARiL0(b0, b1)\ ((int)(b0 - (unsigned)((int)(b1 + 1U) >> 1))) -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avcodec/qtrle: Do not output duplicated frames on insufficient input
Fixes: Timeout Fixes: 6383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-6199846902956032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/qtrle.c| 12 ++--- tests/ref/fate/qtrle-8bit | 109 -- 2 files changed, 6 insertions(+), 115 deletions(-) diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 1b0d2016b5..670690d0a4 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -433,12 +433,10 @@ static int qtrle_decode_frame(AVCodecContext *avctx, int ret; bytestream2_init(&s->g, avpkt->data, avpkt->size); -if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) -return ret; /* check if this frame is even supposed to change */ if (avpkt->size < 8) -goto done; +return avpkt->size; /* start after the chunk size */ bytestream2_seek(&s->g, 4, SEEK_SET); @@ -449,17 +447,20 @@ static int qtrle_decode_frame(AVCodecContext *avctx, /* if a header is present, fetch additional decoding parameters */ if (header & 0x0008) { if (avpkt->size < 14) -goto done; +return avpkt->size; start_line = bytestream2_get_be16(&s->g); bytestream2_skip(&s->g, 2); height = bytestream2_get_be16(&s->g); bytestream2_skip(&s->g, 2); if (height > s->avctx->height - start_line) -goto done; +return avpkt->size; } else { start_line = 0; height = s->avctx->height; } +if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) +return ret; + row_ptr = s->frame->linesize[0] * start_line; switch (avctx->bits_per_coded_sample) { @@ -520,7 +521,6 @@ static int qtrle_decode_frame(AVCodecContext *avctx, memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE); } -done: if ((ret = av_frame_ref(data, s->frame)) < 0) return ret; *got_frame = 1; diff --git a/tests/ref/fate/qtrle-8bit b/tests/ref/fate/qtrle-8bit index 8da113d83e..27bb8aad71 100644 --- a/tests/ref/fate/qtrle-8bit +++ b/tests/ref/fate/qtrle-8bit @@ -4,169 +4,60 @@ #dimensions 0: 640x480 #sar 0: 0/1 0, 0, 0,1, 921600, 0x1492e3ed -0, 1, 1,1, 921600, 0x1492e3ed -0, 2, 2,1, 921600, 0x1492e3ed 0, 3, 3,1, 921600, 0x23ef4fc7 -0, 4, 4,1, 921600, 0x23ef4fc7 0, 5, 5,1, 921600, 0xe406d4be -0, 6, 6,1, 921600, 0xe406d4be -0, 7, 7,1, 921600, 0xe406d4be 0, 8, 8,1, 921600, 0x62b8b5a1 -0, 9, 9,1, 921600, 0x62b8b5a1 0, 10, 10,1, 921600, 0x7d8ba674 -0, 11, 11,1, 921600, 0x7d8ba674 -0, 12, 12,1, 921600, 0x7d8ba674 0, 13, 13,1, 921600, 0xfe666be7 -0, 14, 14,1, 921600, 0xfe666be7 0, 15, 15,1, 921600, 0x721baec0 -0, 16, 16,1, 921600, 0x721baec0 -0, 17, 17,1, 921600, 0x721baec0 0, 18, 18,1, 921600, 0xc237180a -0, 19, 19,1, 921600, 0xc237180a 0, 20, 20,1, 921600, 0xf03a7482 -0, 21, 21,1, 921600, 0xf03a7482 -0, 22, 22,1, 921600, 0xf03a7482 0, 23, 23,1, 921600, 0x5612a391 -0, 24, 24,1, 921600, 0x5612a391 0, 25, 25,1, 921600, 0x9dbcc46a -0, 26, 26,1, 921600, 0x9dbcc46a -0, 27, 27,1, 921600, 0x9dbcc46a 0, 28, 28,1, 921600, 0xa128a5d5 -0, 29, 29,1, 921600, 0xa128a5d5 0, 30, 30,1, 921600, 0x63e0025c -0, 31, 31,1, 921600, 0x63e0025c -0, 32, 32,1, 921600, 0x63e0025c 0, 33, 33,1, 921600, 0x262359ed -0, 34, 34,1, 921600, 0x262359ed 0, 35, 35,1, 921600, 0x343688e8 -0, 36, 36,1, 921600, 0x343688e8 -0, 37, 37,1, 921600, 0x343688e8 -0, 38, 38,1, 921600, 0x343688e8 -0, 39, 39,1, 921600, 0x343688e8 -0, 40, 40,1, 921600, 0x343688e8 -0, 41, 41,1, 921600, 0x343688e8 -0, 42, 42,1, 921600, 0x343688e8 -0, 43, 43,1, 921600, 0x343688e8 -0, 44, 44,1, 921600, 0x343688e8 0, 45, 45,1, 921600, 0xe4b29d57 -0,
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/qtrle: Do not output duplicated frames on insufficient input
On Mon, May 14, 2018 at 1:07 AM, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 6383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-6199846902956032 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > This does not seem like an issue to fix, but a fundamental change in the behavior of the codec. It currently properly honors all frame types, including "empty" frames, which results in proper constant frame rate output. After the change, it just flat out ignores those and discards them without any further consideration. Does not sound like a fuzzing or security related change to me, and possibly also quite the wrong thing to do. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/4] lavc/h2645_parse: add h264_nal_unit_name for h264 NAL type.
2018-05-11 18:19 GMT+08:00 Mark Thompson : > On 11/05/18 06:11, Jun Zhao wrote: >> Signed-off-by: Jun Zhao >> --- >> libavcodec/h2645_parse.c | 26 -- >> 1 file changed, 24 insertions(+), 2 deletions(-) >> >> diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c >> index 579b2c9..8d67579 100644 >> --- a/libavcodec/h2645_parse.c >> +++ b/libavcodec/h2645_parse.c >> @@ -28,6 +28,7 @@ >> >> #include "bytestream.h" >> #include "hevc.h" >> +#include "h264.h" >> #include "h2645_parse.h" >> >> int ff_h2645_extract_rbsp(const uint8_t *src, int length, >> @@ -193,6 +194,27 @@ static const char *hevc_nal_unit_name(int nal_type) >> } >> } >> >> +static const char *h264_nal_unit_name(int nal_type) >> +{ >> +switch(nal_type) { >> +case H264_NAL_SLICE : return "SLICE"; >> +case H264_NAL_DPA : return "DPA"; >> +case H264_NAL_DPB : return "DPB"; >> +case H264_NAL_DPC : return "DPC"; >> +case H264_NAL_IDR_SLICE : return "IDR_SLICE"; >> +case H264_NAL_SEI : return "SEI"; >> +case H264_NAL_SPS : return "SPS"; >> +case H264_NAL_PPS : return "PPS"; >> +case H264_NAL_AUD : return "AUD"; >> +case H264_NAL_END_SEQUENCE: return "END_SEQUENCE"; >> +case H264_NAL_END_STREAM : return "END_STREAM"; >> +case H264_NAL_FILLER_DATA : return "FILLER_DATA"; >> +case H264_NAL_SPS_EXT : return "SPS_EXT"; >> +case H264_NAL_AUXILIARY_SLICE : return "AUXILIARY_SLICE"; > > Unlike H.265 these names aren't defined by the standard, so I think I'd write > them normally ("IDR slice", "End of sequence") rather than using the shouty > enum names. Doesn't really matter, though. I will update the code as the comments, everything that makes the code clearer is worthwhile to do. > >> +default : return "?"; >> +} >> +} >> + >> static int get_bit_length(H2645NAL *nal, int skip_trailing_zeros) >> { >> int size = nal->size; >> @@ -255,8 +277,8 @@ static int h264_parse_nal_header(H2645NAL *nal, void >> *logctx) >> nal->type= get_bits(gb, 5); >> >> av_log(logctx, AV_LOG_DEBUG, >> - "nal_unit_type: %d, nal_ref_idc: %d\n", >> - nal->type, nal->ref_idc); >> + "nal_unit_type: %d(%s), nal_ref_idc: %d\n", >> + nal->type, h264_nal_unit_name(nal->type), nal->ref_idc); >> >> return 1; >> } >> > > LGTM either way. > > Thanks, > > - Mark > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- === Pixelworks Room 301-303 No. 88,Lane 887 Zuchongzhi Road, Zhangjiang Hi-tech Park, Shanghai 201203, China Best Regards, Jun zhao/赵军 +++ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] lavc/cbs_h2645: fix no slice data trigger the assert.
2018-05-11 18:10 GMT+08:00 Mark Thompson : > On 11/05/18 06:11, Jun Zhao wrote: >> when the NALU data with zero, just give a warning. >> >> Fixes ticket #7200 >> >> Signed-off-by: Jun Zhao >> --- >> libavcodec/cbs_h2645.c | 6 +- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c >> index ab33cdb..08b060c 100644 >> --- a/libavcodec/cbs_h2645.c >> +++ b/libavcodec/cbs_h2645.c >> @@ -521,7 +521,11 @@ static int >> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx, >> // Remove trailing zeroes. >> while (size > 0 && nal->data[size - 1] == 0) >> --size; >> -av_assert0(size > 0); >> +if (!size) { >> +av_log(ctx->log_ctx, AV_LOG_WARNING, "No slice data - that was >> just the header. " >> + "Probably invalid unaligned padding on non-final NAL >> unit.\n"); >> +continue; >> +} >> >> data = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE); >> if (!data) >> > > What do we actually want the result to be here? > > On IRC, James suggested: > >> diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c >> index dbf2435677..d436d65f48 100644 >> --- a/libavcodec/h2645_parse.c >> +++ b/libavcodec/h2645_parse.c >> @@ -371,7 +371,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const >> uint8_t *buf, int length, >> ret = hevc_parse_nal_header(nal, logctx); >> else >> ret = h264_parse_nal_header(nal, logctx); >> -if (ret <= 0 || nal->size <= 0) { >> +if (ret <= 0 || nal->size <= 0 || nal->size_bits <= 0) { >> if (ret < 0) { >> av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit %d, >> skipping.\n", >> nal->type); > > which removes it before it gets to the CBS code. I agree this way, I think we need drop the invalid NAL unit as early as possible. > > Another thing we could do is: > >> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c >> index ab33cdb69b..46cd887cdd 100644 >> --- a/libavcodec/cbs_h2645.c >> +++ b/libavcodec/cbs_h2645.c >> @@ -519,7 +519,7 @@ static int >> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx, >> uint8_t *data; >> >> // Remove trailing zeroes. >> -while (size > 0 && nal->data[size - 1] == 0) >> +while (size > 1 && nal->data[size - 1] == 0) >> --size; >> av_assert0(size > 0); >> > > which would make it parse as an empty NAL unit of type 0 (unspecified), and > therefore pass through into the output stream in the h264_metadata case. > > So, what do you think? Do you know what made your sample stream? I got this sample from a live streaming android phone APPs > > - Mark > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/4] lavc/cbs_h2645: fix no slice data trigger the assert.
2018-05-11 23:38 GMT+08:00 James Almer : > On 5/11/2018 7:10 AM, Mark Thompson wrote: >> On 11/05/18 06:11, Jun Zhao wrote: >>> when the NALU data with zero, just give a warning. >>> >>> Fixes ticket #7200 >>> >>> Signed-off-by: Jun Zhao >>> --- >>> libavcodec/cbs_h2645.c | 6 +- >>> 1 file changed, 5 insertions(+), 1 deletion(-) >>> >>> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c >>> index ab33cdb..08b060c 100644 >>> --- a/libavcodec/cbs_h2645.c >>> +++ b/libavcodec/cbs_h2645.c >>> @@ -521,7 +521,11 @@ static int >>> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx, >>> // Remove trailing zeroes. >>> while (size > 0 && nal->data[size - 1] == 0) >>> --size; >>> -av_assert0(size > 0); >>> +if (!size) { >>> +av_log(ctx->log_ctx, AV_LOG_WARNING, "No slice data - that was >>> just the header. " >>> + "Probably invalid unaligned padding on non-final NAL >>> unit.\n"); >>> +continue; >>> +} >>> >>> data = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE); >>> if (!data) >>> >> >> What do we actually want the result to be here? >> >> On IRC, James suggested: >> >>> diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c >>> index dbf2435677..d436d65f48 100644 >>> --- a/libavcodec/h2645_parse.c >>> +++ b/libavcodec/h2645_parse.c >>> @@ -371,7 +371,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const >>> uint8_t *buf, int length, >>> ret = hevc_parse_nal_header(nal, logctx); >>> else >>> ret = h264_parse_nal_header(nal, logctx); >>> -if (ret <= 0 || nal->size <= 0) { >>> +if (ret <= 0 || nal->size <= 0 || nal->size_bits <= 0) { >>> if (ret < 0) { >>> av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit %d, >>> skipping.\n", >>> nal->type); >> >> which removes it before it gets to the CBS code. >> >> Another thing we could do is: >> >>> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c >>> index ab33cdb69b..46cd887cdd 100644 >>> --- a/libavcodec/cbs_h2645.c >>> +++ b/libavcodec/cbs_h2645.c >>> @@ -519,7 +519,7 @@ static int >>> cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx, >>> uint8_t *data; >>> >>> // Remove trailing zeroes. >>> -while (size > 0 && nal->data[size - 1] == 0) >>> +while (size > 1 && nal->data[size - 1] == 0) >>> --size; >>> av_assert0(size > 0); >>> >> >> which would make it parse as an empty NAL unit of type 0 (unspecified), and >> therefore pass through into the output stream in the h264_metadata case. >> >> So, what do you think? Do you know what made your sample stream? >> >> - Mark > > Taking into account the analysis by mkver in the trac ticket, where he > found out the bitstream contains "00 00 00 01 00 00 00 01" with the > second start code being a real valid NAL, i think this should definitely > be fixed in h2645_parse. No reason to propagate a non existent NAL like > this. > We should either use my fix, or another that actually prevents nal->size > from inexplicably becoming 1 in this scenario. Now h2645_parse give a loose check in ff_h2645_packet_split(), and I agree use your fix > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] qsv: Use the installed mfx include headers if possibile
> On 11/05/18 08:52, Haihao Xiang wrote: > > Currently an extra copy of mfx include headers from > > {MSDK_INSTALL_PREFIX}/include > > to {MSDK_INSTALL_PREFIX}/include/mfx is required when using pkg-config for > > libmfx detection. This fix checks the installed mfx include headers first, > > and falls back to the legacy way if that fails > > > > Signed-off-by: Haihao Xiang > > --- > > configure| 3 ++- > > fftools/ffmpeg_qsv.c | 5 + > > libavcodec/qsv.c | 10 ++ > > libavcodec/qsv.h | 4 > > libavcodec/qsv_internal.h| 4 > > libavcodec/qsvdec.c | 4 > > libavcodec/qsvdec.h | 4 > > libavcodec/qsvdec_h2645.c| 4 > > libavcodec/qsvdec_other.c| 4 > > libavcodec/qsvenc.c | 5 + > > libavcodec/qsvenc.h | 4 > > libavcodec/qsvenc_h264.c | 4 > > libavcodec/qsvenc_hevc.c | 4 > > libavcodec/qsvenc_jpeg.c | 4 > > libavcodec/qsvenc_mpeg2.c| 4 > > libavfilter/qsvvpp.h | 4 > > libavfilter/vf_deinterlace_qsv.c | 4 > > libavfilter/vf_scale_qsv.c | 4 > > libavutil/hwcontext_opencl.c | 4 > > libavutil/hwcontext_qsv.c| 4 > > libavutil/hwcontext_qsv.h| 4 > > 21 files changed, 90 insertions(+), 1 deletion(-) > > I don't think it's a good idea to put an #ifdef like this in every file. > > > > > diff --git a/configure b/configure > > index a1f13a7109..e1f72495fb 100755 > > --- a/configure > > +++ b/configure > > @@ -6007,7 +6007,8 @@ enabled libkvazaar&& require_pkg_config > > libkvazaar "kvazaar >= 0.8.1" kv > > # Media SDK or Intel Media Server Studio, these don't come with > > # pkg-config support. Instead, users should make sure that the build > > # can find the libraries and headers through other means. > > -enabled libmfx&& { check_pkg_config libmfx libmfx > > "mfx/mfxvideo.h" MFXInit || > > +enabled libmfx&& { { check_pkg_config libmfx libmfx > > "mfxvideo.h" MFXInit && add_cflags -DMFX_DEFAULT_INC_PATH; } || > > + { check_pkg_config libmfx libmfx > > "mfx/mfxvideo.h" MFXInit; } || > > { require libmfx "mfx/mfxvideo.h" MFXInit "- > > llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } } > > enabled libmodplug&& require_pkg_config libmodplug libmodplug > > libmodplug/modplug.h ModPlug_Load > > enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h > > lame_set_VBR_quality -lmp3lame $libm_extralibs > > So in the current code, the first test is for the open-source dispatcher ( ps://github.com/lu-zero/mfx_dispatch>), which gets used everywhere that > pkgconfig is supported, including mingw on Windows. The second test is for > Windows cases where you can't make make pkgconfig work. > > What installs the headers directly in $PREFIX/include? Presumably this is a > new change - can we ask them not to do that? (Because organising them in a > subdirectory is I think much more sensible.) > Link below is the open-source version of MediaSDK which installs the headers directly in $PREFIX/include. User needn't the open-source dispatcher any more on Linux https://github.com/Intel-Media-SDK/MediaSDK > - Mark > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] qsv: Use the installed mfx include headers if possibile
On Mon, 2018-05-14 at 00:50 +, Xiang, Haihao wrote: > > On 11/05/18 08:52, Haihao Xiang wrote: > > > Currently an extra copy of mfx include headers from > > > {MSDK_INSTALL_PREFIX}/include > > > to {MSDK_INSTALL_PREFIX}/include/mfx is required when using pkg-config for > > > libmfx detection. This fix checks the installed mfx include headers first, > > > and falls back to the legacy way if that fails > > > > > > Signed-off-by: Haihao Xiang > > > --- > > > configure| 3 ++- > > > fftools/ffmpeg_qsv.c | 5 + > > > libavcodec/qsv.c | 10 ++ > > > libavcodec/qsv.h | 4 > > > libavcodec/qsv_internal.h| 4 > > > libavcodec/qsvdec.c | 4 > > > libavcodec/qsvdec.h | 4 > > > libavcodec/qsvdec_h2645.c| 4 > > > libavcodec/qsvdec_other.c| 4 > > > libavcodec/qsvenc.c | 5 + > > > libavcodec/qsvenc.h | 4 > > > libavcodec/qsvenc_h264.c | 4 > > > libavcodec/qsvenc_hevc.c | 4 > > > libavcodec/qsvenc_jpeg.c | 4 > > > libavcodec/qsvenc_mpeg2.c| 4 > > > libavfilter/qsvvpp.h | 4 > > > libavfilter/vf_deinterlace_qsv.c | 4 > > > libavfilter/vf_scale_qsv.c | 4 > > > libavutil/hwcontext_opencl.c | 4 > > > libavutil/hwcontext_qsv.c| 4 > > > libavutil/hwcontext_qsv.h| 4 > > > 21 files changed, 90 insertions(+), 1 deletion(-) > > > > I don't think it's a good idea to put an #ifdef like this in every file. > > > > > > > > diff --git a/configure b/configure > > > index a1f13a7109..e1f72495fb 100755 > > > --- a/configure > > > +++ b/configure > > > @@ -6007,7 +6007,8 @@ enabled libkvazaar&& require_pkg_config > > > libkvazaar "kvazaar >= 0.8.1" kv > > > # Media SDK or Intel Media Server Studio, these don't come with > > > # pkg-config support. Instead, users should make sure that the build > > > # can find the libraries and headers through other means. > > > -enabled libmfx&& { check_pkg_config libmfx libmfx > > > "mfx/mfxvideo.h" MFXInit || > > > +enabled libmfx&& { { check_pkg_config libmfx libmfx > > > "mfxvideo.h" MFXInit && add_cflags -DMFX_DEFAULT_INC_PATH; } || > > > + { check_pkg_config libmfx libmfx > > > "mfx/mfxvideo.h" MFXInit; } || > > > { require libmfx "mfx/mfxvideo.h" MFXInit > > > "- > > > llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } > > > } > > > enabled libmodplug&& require_pkg_config libmodplug libmodplug > > > libmodplug/modplug.h ModPlug_Load > > > enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h > > > lame_set_VBR_quality -lmp3lame $libm_extralibs > > > > So in the current code, the first test is for the open-source dispatcher > > ( > ps://github.com/lu-zero/mfx_dispatch>), which gets used everywhere that > > pkgconfig is supported, including mingw on Windows. The second test is for > > Windows cases where you can't make make pkgconfig work. > > > > What installs the headers directly in $PREFIX/include? Presumably this is a > > new change - can we ask them not to do that? (Because organising them in a > > subdirectory is I think much more sensible.) > > > > Link below is the open-source version of MediaSDK which installs the headers > directly in $PREFIX/include. User needn't the open-source dispatcher any more > on > Linux > > https://github.com/Intel-Media-SDK/MediaSDK > I filed https://github.com/Intel-Media-SDK/MediaSDK/issues/199, hope they can change the install path for mfx headers. Thanks Haihao > > - Mark > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] (no subject)
Dear user of ffmpeg.org, administration of ffmpeg.org would like to let you know that: Your account was used to send a large amount of junk e-mail messages during the last week. Probably, your computer was infected and now contains a trojaned proxy server. Please follow our instruction in order to keep your computer safe. Best wishes, ffmpeg.org user support team. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/dashenc: Add documentation for http method option
Pushed. On 5/7/18 9:23 AM, Karthick J wrote: > From: Karthick Jeyapal > > --- > doc/muxers.texi | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index 2429f8e..ea80296 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -252,6 +252,8 @@ DASH-templated name to used for the initialization > segment. Default is "init-str > DASH-templated name to used for the media segments. Default is > "chunk-stream$RepresentationID$-$Number%05d$.m4s" > @item -utc_timing_url @var{utc_url} > URL of the page that will return the UTC timestamp in ISO format. Example: > "https://time.akamai.com/?iso"; > +@item method @var{method} > +Use the given HTTP method to create output files. Generally set to PUT or > POST. > @item -http_user_agent @var{user_agent} > Override User-Agent field in HTTP header. Applicable only for HTTP output. > @item -http_persistent @var{http_persistent} ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v2 1/2] avformat/dashenc: Added option for Segment file format
From: Karthick Jeyapal Right now segment file format is chosen to be either mp4 or webm based on the codec format. This patch makes that choice configurable by the user, instead of being decided by the muxer. Also with this change per-stream choice segment file format(based on codec type) is not possible. All the output audio and video streams should be in the same file format. --- doc/muxers.texi | 8 +++ libavformat/dashenc.c | 66 +-- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 57948cf..ea80296 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -284,6 +284,14 @@ corrects that index value. Typically this logic is needed in live streaming use cases. The network bandwidth fluctuations are common during long run streaming. Each fluctuation can cause the segment indexes fall behind the expected real time position. + +@item dash_segment_type @var{dash_segment_type} +Possible values: +@item mp4 +If this flag is set, the dash segment files will be in in ISOBMFF format. This is the default format. + +@item webm +If this flag is set, the dash segment files will be in in WebM format. @end table @anchor{framecrc} diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 1dd6333..9a57ad1 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -48,6 +48,12 @@ #include "vpcc.h" #include "dash.h" +typedef enum { +SEGMENT_TYPE_MP4 = 0, +SEGMENT_TYPE_WEBM, +SEGMENT_TYPE_NB +} SegmentType; + typedef struct Segment { char file[1024]; int64_t start_pos; @@ -69,7 +75,6 @@ typedef struct OutputStream { AVFormatContext *ctx; int ctx_inited, as_idx; AVIOContext *out; -char format_name[8]; int packets_written; char initfile[1024]; int64_t init_start_pos, pos; @@ -125,6 +130,8 @@ typedef struct DASHContext { int streaming; int64_t timeout; int index_correction; +SegmentType segment_type; +const char *format_name; } DASHContext; static struct codec_string { @@ -138,6 +145,15 @@ static struct codec_string { { 0, NULL } }; +static struct format_string { +SegmentType segment_type; +const char *str; +} formats[] = { +{ SEGMENT_TYPE_MP4, "mp4" }, +{ SEGMENT_TYPE_WEBM, "webm" }, +{ 0, NULL } +}; + static int dashenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename, AVDictionary **options) { DASHContext *c = s->priv_data; @@ -171,6 +187,14 @@ static void dashenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filenam } } +static const char *get_format_str(SegmentType segment_type) { +int i; +for (i = 0; i < SEGMENT_TYPE_NB; i++) +if (formats[i].segment_type == segment_type) +return formats[i].str; +return NULL; +} + static void set_vp9_codec_str(AVFormatContext *s, AVCodecParameters *par, AVRational *frame_rate, char *str, int size) { VPCC vpcc; @@ -581,13 +605,13 @@ static int write_adaptation_set(AVFormatContext *s, AVIOContext *out, int as_ind if (as->media_type == AVMEDIA_TYPE_VIDEO) { AVStream *st = s->streams[i]; avio_printf(out, "\t\t\tformat_name, os->codec_str, bandwidth_str, s->streams[i]->codecpar->width, s->streams[i]->codecpar->height); +i, c->format_name, os->codec_str, bandwidth_str, s->streams[i]->codecpar->width, s->streams[i]->codecpar->height); if (st->avg_frame_rate.num) avio_printf(out, " frameRate=\"%d/%d\"", st->avg_frame_rate.num, st->avg_frame_rate.den); avio_printf(out, ">\n"); } else { avio_printf(out, "\t\t\t\n", -i, os->format_name, os->codec_str, bandwidth_str, s->streams[i]->codecpar->sample_rate); +i, c->format_name, os->codec_str, bandwidth_str, s->streams[i]->codecpar->sample_rate); avio_printf(out, "\t\t\t\t\n", s->streams[i]->codecpar->channels); } @@ -959,27 +983,10 @@ static int dash_init(AVFormatContext *s) if (!ctx) return AVERROR(ENOMEM); -// choose muxer based on codec: webm for VP8 and opus, mp4 otherwise -// note: os->format_name is also used as part of the mimetype of the -// representation, e.g. video/ -if (s->streams[i]->codecpar->codec_id == AV_CODEC_ID_VP8 || -s->streams[i]->codecpar->codec_id == AV_CODEC_ID_OPUS || -s->streams[i]->codecpar->codec_id == AV_CODEC_ID_VORBIS) { -snprintf(os->format_name, sizeof(os->format_name), "webm"); - -if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { -av_log(s, AV_LOG_ERROR, - "WebM support in dashenc is experimental and has not " - "been validated. For testing purposes, make sure " -
[FFmpeg-devel] [PATCH v2 2/2] avformat/dashenc: Added a warning for incorrect segment name extension
From: Karthick Jeyapal Applicable only to webm output format. By default all the segment filenames end with .m4s extension. When someone chooses webm output format, we recommend they also override the relevant segment name options to end with .webm extension. This patch will issue a warning for he same --- libavformat/dashenc.c | 21 + 1 file changed, 21 insertions(+) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index 9a57ad1..4e83112 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -195,6 +195,16 @@ static const char *get_format_str(SegmentType segment_type) { return NULL; } +static int check_file_extension(const char *filename, const char *extension) { +char *dot; +if (!filename || !extension) +return -1; +dot = strrchr(filename, '.'); +if (dot && !strcmp(dot + 1, extension)) +return 0; +return -1; +} + static void set_vp9_codec_str(AVFormatContext *s, AVCodecParameters *par, AVRational *frame_rate, char *str, int size) { VPCC vpcc; @@ -986,6 +996,17 @@ static int dash_init(AVFormatContext *s) c->format_name = get_format_str(c->segment_type); if (!c->format_name) return AVERROR_MUXER_NOT_FOUND; +if (c->segment_type == SEGMENT_TYPE_WEBM) { +if ((!c->single_file && check_file_extension(c->init_seg_name, c->format_name) != 0) || +(!c->single_file && check_file_extension(c->media_seg_name, c->format_name) != 0) || +(c->single_file && check_file_extension(c->single_file_name, c->format_name) != 0)) { +av_log(s, AV_LOG_WARNING, + "One or many segment file names doesn't end with .webm. " + "Override -init_seg_name and/or -media_seg_name and/or " + "-single_file_name to end with the extension .webm\n"); +} +} + ctx->oformat = av_guess_format(c->format_name, NULL, NULL); if (!ctx->oformat) return AVERROR_MUXER_NOT_FOUND; -- 2.7.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avformat/dashenc: Added option for Segment file format
On 5/12/18 8:47 PM, Jan Ekström wrote: > On Fri, May 4, 2018 at 9:32 AM, Karthick J wrote: >> From: Karthick Jeyapal >> >> Right now segment file format is chosen to be either mp4 or webm based on >> the codec format. >> This patch makes that choice configurable by the user, instead of being >> decided by the muxer. >> --- >> doc/muxers.texi | 8 >> libavformat/dashenc.c | 48 ++-- >> 2 files changed, 30 insertions(+), 26 deletions(-) >> > > Hi, > > Sorry for getting to this so late, been busy on various things (as > usual). Thanks for prodding me. Thanks for your reply. > >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index 6f03bba..2429f8e 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -282,6 +282,14 @@ corrects that index value. >> Typically this logic is needed in live streaming use cases. The network >> bandwidth >> fluctuations are common during long run streaming. Each fluctuation can >> cause >> the segment indexes fall behind the expected real time position. >> + >> +@item dash_segment_type @var{dash_segment_type} >> +Possible values: >> +@item mp4 >> +If this flag is set, the dash segment files will be in in ISOBMFF format. >> This is the default format. >> + >> +@item webm >> +If this flag is set, the dash segment files will be in in WebM format. >> @end table >> >> @anchor{framecrc} >> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c >> index 1dd6333..412f074 100644 >> --- a/libavformat/dashenc.c >> +++ b/libavformat/dashenc.c >> @@ -48,6 +48,11 @@ >> #include "vpcc.h" >> #include "dash.h" >> >> +typedef enum { >> +SEGMENT_TYPE_MP4, >> +SEGMENT_TYPE_WEBM, >> +} SegmentType; >> + > I agree with all your comments below. Please find the newer patch in http://ffmpeg.org/pipermail/ffmpeg-devel/2018-May/229998.html which tries to address most of them. > Ah yes, an enum :) I really like the checks being equality/inequality > now. I've seen things like SEGMENT_TYPE_NB used for the stopper so > that in the AVOption you can then set the maximum to *_NB - 1 instead > of then having to change it if it ever gets anything added to it. > > Maybe consider making something like the `codecs[]` array for formats > and make the thing in DASHContext as a char pointer, so that you can > just point the string pointer to its value in init() instead of doing > a run-time strncpy. > > This does remove the "dynamicness" of the per-stream selection, which > possibly should be mentioned. But at least personally I think this is > what people actually wanted with WebM vs ISOBMFF DASH selection ;) , > as in not having surprises between streams. > > Otherwise this patch generally looks alright, leaving just the segment > file name part not automatical just yet :) (I feel like we need to > have separate options for the general template and the extension). > > Best regards, > Jan > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2 1/2] avformat/dashenc: Added option for Segment file format
On 5/14/2018 11:41 AM, Karthick J wrote: Right now segment file format is chosen to be either mp4 or webm based on the codec format. This patch makes that choice configurable by the user, instead of being decided by the muxer. Can you update the docs to reflect on the differences between using the dash muxer for WebM and the webm_dash_manifest + webm_chunk muxers? Thanks, Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel