Re: [FFmpeg-devel] [PATCH] avfilter: add lv2 wrapper filter
On 11/24/17, Paul B Mahol wrote: > On 11/24/17, Derek Buitenhuis wrote: >> On 11/23/2017 9:16 PM, Paul B Mahol wrote: >> >>> +typedef struct LV2Context { >>> +const AVClass *class; >>> +char *plugin_uri; >>> +char *options; >>> + >>> +unsigned long nb_inputs; >>> +unsigned long nb_inputcontrols; >>> +unsigned long nb_outputs; >> >> Why are you using longs instead of stdint? > > Fixed. > >> >>> +table->uris = av_realloc(table->uris, ++table->n_uris * >>> sizeof(char*)); >>> +table->uris[table->n_uris - 1] = av_malloc(len + 1); >> >> Every single allocation in this whole file is completely unchecked. >> That's >> not OK. > > Fixed. > If there are no more comments, I would like to apply this. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add lv2 wrapper filter
On 11/24/17, Derek Buitenhuis wrote: > On 11/23/2017 9:16 PM, Paul B Mahol wrote: > >> +typedef struct LV2Context { >> +const AVClass *class; >> +char *plugin_uri; >> +char *options; >> + >> +unsigned long nb_inputs; >> +unsigned long nb_inputcontrols; >> +unsigned long nb_outputs; > > Why are you using longs instead of stdint? Fixed. > >> +table->uris = av_realloc(table->uris, ++table->n_uris * >> sizeof(char*)); >> +table->uris[table->n_uris - 1] = av_malloc(len + 1); > > Every single allocation in this whole file is completely unchecked. That's > not OK. Fixed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add lv2 wrapper filter
On 11/23/2017 9:16 PM, Paul B Mahol wrote: > +typedef struct LV2Context { > +const AVClass *class; > +char *plugin_uri; > +char *options; > + > +unsigned long nb_inputs; > +unsigned long nb_inputcontrols; > +unsigned long nb_outputs; Why are you using longs instead of stdint? > +table->uris = av_realloc(table->uris, ++table->n_uris * sizeof(char*)); > +table->uris[table->n_uris - 1] = av_malloc(len + 1); Every single allocation in this whole file is completely unchecked. That's not OK. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add lv2 wrapper filter
On 11/23/17, James Almer wrote: > On 11/23/2017 6:16 PM, Paul B Mahol wrote: >> Signed-off-by: Paul B Mahol >> --- >> configure| 4 + >> doc/filters.texi | 37 >> libavfilter/Makefile | 1 + >> libavfilter/af_lv2.c | 552 >> +++ >> libavfilter/allfilters.c | 1 + >> 5 files changed, 595 insertions(+) >> create mode 100644 libavfilter/af_lv2.c >> >> diff --git a/configure b/configure >> index 3ec6407fb2..84c965ce4a 100755 >> --- a/configure >> +++ b/configure >> @@ -283,6 +283,7 @@ External library support: >>--enable-libzimg enable z.lib, needed for zscale filter [no] >>--enable-libzmq enable message passing via libzmq [no] >>--enable-libzvbi enable teletext support via libzvbi [no] >> + --enable-lv2 enable LV2 audio filtering [no] >>--disable-lzma disable lzma [autodetect] >>--enable-decklinkenable Blackmagic DeckLink I/O support [no] >>--enable-libndi_newtek enable Newteck NDI I/O support [no] >> @@ -1631,6 +1632,7 @@ EXTERNAL_LIBRARY_LIST=" >> libzimg >> libzmq >> libzvbi >> +lv2 >> mediacodec >> openal >> opengl >> @@ -3229,6 +3231,7 @@ hqdn3d_filter_deps="gpl" >> interlace_filter_deps="gpl" >> kerndeint_filter_deps="gpl" >> ladspa_filter_deps="ladspa libdl" >> +lv2_filter_deps="lilv" > > This should be > > lv2_filter_deps="lv2" > >> mcdeint_filter_deps="avcodec gpl" >> movie_filter_deps="avcodec avformat" >> mpdecimate_filter_deps="gpl" >> @@ -5829,6 +5832,7 @@ enabled gmp && require gmp gmp.h >> mpz_export -lgmp >> enabled gnutls&& require_pkg_config gnutls gnutls >> gnutls/gnutls.h gnutls_global_init >> enabled jni && { [ $target_os = "android" ] && check_header >> jni.h && enabled pthreads || die "ERROR: jni not found"; } >> enabled ladspa&& require_header ladspa.h >> +enabled lv2 && require_pkg_config lilv lilv-0 >> "lilv-0/lilv/lilv.h" lilv_world_new > > And this should be > > require_pkg_config lv2 lilv-0 "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 > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > fixed, thanks ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add lv2 wrapper filter
On 11/23/2017 6:16 PM, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > configure| 4 + > doc/filters.texi | 37 > libavfilter/Makefile | 1 + > libavfilter/af_lv2.c | 552 > +++ > libavfilter/allfilters.c | 1 + > 5 files changed, 595 insertions(+) > create mode 100644 libavfilter/af_lv2.c > > diff --git a/configure b/configure > index 3ec6407fb2..84c965ce4a 100755 > --- a/configure > +++ b/configure > @@ -283,6 +283,7 @@ External library support: >--enable-libzimg enable z.lib, needed for zscale filter [no] >--enable-libzmq enable message passing via libzmq [no] >--enable-libzvbi enable teletext support via libzvbi [no] > + --enable-lv2 enable LV2 audio filtering [no] >--disable-lzma disable lzma [autodetect] >--enable-decklinkenable Blackmagic DeckLink I/O support [no] >--enable-libndi_newtek enable Newteck NDI I/O support [no] > @@ -1631,6 +1632,7 @@ EXTERNAL_LIBRARY_LIST=" > libzimg > libzmq > libzvbi > +lv2 > mediacodec > openal > opengl > @@ -3229,6 +3231,7 @@ hqdn3d_filter_deps="gpl" > interlace_filter_deps="gpl" > kerndeint_filter_deps="gpl" > ladspa_filter_deps="ladspa libdl" > +lv2_filter_deps="lilv" This should be lv2_filter_deps="lv2" > mcdeint_filter_deps="avcodec gpl" > movie_filter_deps="avcodec avformat" > mpdecimate_filter_deps="gpl" > @@ -5829,6 +5832,7 @@ enabled gmp && require gmp gmp.h > mpz_export -lgmp > enabled gnutls&& require_pkg_config gnutls gnutls > gnutls/gnutls.h gnutls_global_init > enabled jni && { [ $target_os = "android" ] && check_header > jni.h && enabled pthreads || die "ERROR: jni not found"; } > enabled ladspa&& require_header ladspa.h > +enabled lv2 && require_pkg_config lilv lilv-0 > "lilv-0/lilv/lilv.h" lilv_world_new And this should be require_pkg_config lv2 lilv-0 "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 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel