Re: [FFmpeg-devel] [PATCH] avcodec/cbs_misc: remove anonymous union for gcc4.4 compat
> Am 14.09.2019 um 00:48 schrieb Aman Gupta : > > From: Aman Gupta > > Signed-off-by: Aman Gupta > --- > libavcodec/cbs_misc.c | 14 +++--- > libavcodec/cbs_misc.h | 4 ++-- > libavcodec/cbs_misc_syntax_template.c | 8 > libavcodec/h264_metadata_bsf.c| 4 ++-- > libavcodec/mpeg2_metadata_bsf.c | 2 +- > 5 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/libavcodec/cbs_misc.c b/libavcodec/cbs_misc.c Does not apply to current FFmpeg git head, please merge this patch into the patch adding the new file. And please don‘t CC me on emails sent to one of the FFmpeg mailing lists. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2 3/3] FATE: add fate test for minterpolate filter
From: Limin Wang Signed-off-by: Limin Wang --- tests/fate/filter-video.mak | 4 tests/ref/fate/filter-minterpolate-down | 6 ++ tests/ref/fate/filter-minterpolate-up | 15 +++ 3 files changed, 25 insertions(+) create mode 100644 tests/ref/fate/filter-minterpolate-down create mode 100644 tests/ref/fate/filter-minterpolate-up diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 0c6ee72..ab7b624 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -122,6 +122,10 @@ FATE_FILTER-$(call ALLYES, FRAMERATE_FILTER TESTSRC2_FILTER FORMAT_FILTER) += fa fate-filter-framerate-12bit-up: CMD = framecrc -lavfi testsrc2=r=50:d=1,format=pix_fmts=yuv422p12le,framerate=fps=60 -t 1 -pix_fmt yuv422p12le fate-filter-framerate-12bit-down: CMD = framecrc -lavfi testsrc2=r=60:d=1,format=pix_fmts=yuv422p12le,framerate=fps=50 -t 1 -pix_fmt yuv422p12le +FATE_FILTER-$(call ALLYES, MINTERPOLATE_FILTER TESTSRC2_FILTER) += fate-filter-minterpolate-up fate-filter-minterpolate-down +fate-filter-minterpolate-up: CMD = framecrc -lavfi testsrc2=r=2:d=10,framerate=fps=10 -t 1 +fate-filter-minterpolate-down: CMD = framecrc -lavfi testsrc2=r=2:d=10,framerate=fps=1 -t 1 + FATE_FILTER_VSYNTH-$(CONFIG_BOXBLUR_FILTER) += fate-filter-boxblur fate-filter-boxblur: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf boxblur=2:1 diff --git a/tests/ref/fate/filter-minterpolate-down b/tests/ref/fate/filter-minterpolate-down new file mode 100644 index 000..4eab7aa --- /dev/null +++ b/tests/ref/fate/filter-minterpolate-down @@ -0,0 +1,6 @@ +#tb 0: 1/1 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 320x240 +#sar 0: 1/1 +0, 0, 0,1, 115200, 0x3744b3ed diff --git a/tests/ref/fate/filter-minterpolate-up b/tests/ref/fate/filter-minterpolate-up new file mode 100644 index 000..a276bf6 --- /dev/null +++ b/tests/ref/fate/filter-minterpolate-up @@ -0,0 +1,15 @@ +#tb 0: 1/10 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 320x240 +#sar 0: 1/1 +0, 0, 0,1, 115200, 0x3744b3ed +0, 1, 1,1, 115200, 0xec1fdfa0 +0, 2, 2,1, 115200, 0xa17f0d74 +0, 3, 3,1, 115200, 0xd72532a9 +0, 4, 4,1, 115200, 0x032e60f8 +0, 5, 5,1, 115200, 0x6e318ba0 +0, 6, 6,1, 115200, 0x76018292 +0, 7, 7,1, 115200, 0x89e27599 +0, 8, 8,1, 115200, 0x68536eac +0, 9, 9,1, 115200, 0xc3ac62a8 -- 2.6.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2 2/3] avfilter/vf_minterpolate: change the default threshold to get better scene change detect result
From: Limin Wang ./ffmpeg -loglevel debug -i ../fate-suite/svq3/Vertical400kbit.sorenson3.mov -vf minterpolate=fps=60:mi_mode=blend -an -f null - [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 1600 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 4120 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 5780 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 6700 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 8140 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 9740 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 14060 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 15680 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 18480 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 20020 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 21740 The results are consistent with tests/ref/fate/filter-metadata-scenedetect For the master, it'll detect more than 20 scene change for the same source. Signed-off-by: Limin Wang --- doc/filters.texi | 2 +- libavfilter/vf_minterpolate.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 9d500e4..a39785d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12743,7 +12743,7 @@ Frame difference. Corresponding pixel values are compared and if it satisfies @v Default method is @samp{fdiff}. @item scd_threshold -Scene change detection threshold. Default is @code{5.0}. +Scene change detection threshold. Default is @code{10.}. @end table @section mix diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index fc8054b..c9ce804 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -230,7 +230,7 @@ static const AVOption minterpolate_options[] = { { "scd", "scene change detection method", OFFSET(scd_method), AV_OPT_TYPE_INT, {.i64 = SCD_METHOD_FDIFF}, SCD_METHOD_NONE, SCD_METHOD_FDIFF, FLAGS, "scene" }, CONST("none", "disable detection", SCD_METHOD_NONE,"scene"), CONST("fdiff", "frame difference", SCD_METHOD_FDIFF, "scene"), -{ "scd_threshold", "scene change threshold", OFFSET(scd_threshold), AV_OPT_TYPE_DOUBLE, {.dbl = 5.0}, 0, 100.0, FLAGS }, +{ "scd_threshold", "scene change threshold", OFFSET(scd_threshold), AV_OPT_TYPE_DOUBLE, {.dbl = 10.}, 0, 100.0, FLAGS }, { NULL } }; @@ -1097,6 +1097,7 @@ static void interpolate(AVFilterLink *inlink, AVFrame *avf_out) } if (mi_ctx->scene_changed) { +av_log(ctx, AV_LOG_DEBUG, "scene changed, input pts %"PRId64"\n", mi_ctx->frames[1].avf->pts); /* duplicate frame */ av_frame_copy(avf_out, alpha > ALPHA_MAX / 2 ? mi_ctx->frames[2].avf : mi_ctx->frames[1].avf); return; -- 2.6.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2 1/3] avfilter/vf_minterpolate: correct the mafd calculation
From: Limin Wang Signed-off-by: Limin Wang --- libavfilter/vf_minterpolate.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index b0bb238..fc8054b 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -185,6 +185,7 @@ typedef struct MIContext { int64_t out_pts; int b_width, b_height, b_count; int log2_mb_size; +int bitdepth; int scd_method; int scene_changed; @@ -343,6 +344,7 @@ static int config_input(AVFilterLink *inlink) mi_ctx->log2_chroma_h = desc->log2_chroma_h; mi_ctx->log2_chroma_w = desc->log2_chroma_w; +mi_ctx->bitdepth = desc->comp[0].depth; mi_ctx->nb_planes = av_pix_fmt_count_planes(inlink->format); @@ -383,7 +385,7 @@ static int config_input(AVFilterLink *inlink) } if (mi_ctx->scd_method == SCD_METHOD_FDIFF) { -mi_ctx->sad = ff_scene_sad_get_fn(8); +mi_ctx->sad = ff_scene_sad_get_fn(mi_ctx->bitdepth == 8 ? 8 : 16); if (!mi_ctx->sad) return AVERROR(EINVAL); } @@ -836,7 +838,7 @@ static int detect_scene_change(MIContext *mi_ctx) uint64_t sad; mi_ctx->sad(p1, linesize1, p2, linesize2, me_ctx->width, me_ctx->height, &sad); emms_c(); -mafd = (double) sad / (me_ctx->height * me_ctx->width * 3); +mafd = (double) sad * 100.0 / (me_ctx->height * me_ctx->width) / (1 << mi_ctx->bitdepth); diff = fabs(mafd - mi_ctx->prev_mafd); ret = av_clipf(FFMIN(mafd, diff), 0, 100.0); mi_ctx->prev_mafd = mafd; -- 2.6.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v3] avcodec/h2645_parse: refine the code for better readiablity
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/h2645_parse.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c index ef6a6b4..8b9595a 100644 --- a/libavcodec/h2645_parse.c +++ b/libavcodec/h2645_parse.c @@ -453,23 +453,22 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, } } -if (pkt->nals_allocated < pkt->nb_nals + 1) { -int new_size = pkt->nals_allocated + 1; -void *tmp = av_realloc_array(pkt->nals, new_size, sizeof(*pkt->nals)); +if (pkt->nb_nals >= pkt->nals_allocated) { +void *tmp = av_realloc_array(pkt->nals, pkt->nals_allocated + 1, sizeof(*pkt->nals)); if (!tmp) return AVERROR(ENOMEM); pkt->nals = tmp; -memset(pkt->nals + pkt->nals_allocated, 0, sizeof(*pkt->nals)); +nal = &pkt->nals[pkt->nals_allocated]; -nal = &pkt->nals[pkt->nb_nals]; +memset(nal, 0, sizeof(*pkt->nals)); nal->skipped_bytes_pos_size = 1024; // initial buffer size nal->skipped_bytes_pos = av_malloc_array(nal->skipped_bytes_pos_size, sizeof(*nal->skipped_bytes_pos)); if (!nal->skipped_bytes_pos) return AVERROR(ENOMEM); -pkt->nals_allocated = new_size; +pkt->nals_allocated++; } nal = &pkt->nals[pkt->nb_nals]; -- 2.6.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V1 1/4] lavf/hls: refine the log message
> 在 2019年9月13日,19:53,Jun Zhao 写道: > > From: Jun Zhao > > refine the log message, it's will help the debugging > > Signed-off-by: Jun Zhao > --- > libavformat/hls.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index 61b6759..10fc568 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -664,7 +664,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, > const char *url, > } else if (ret < 0) { > if (ret != AVERROR_EOF) > av_log(s, AV_LOG_WARNING, > -"keepalive request failed for '%s' when opening url, > retrying with new connection: %s\n", > +"keepalive request failed for '%s' with error: '%s' when > opening url, retrying with new connection\n", > url, av_err2str(ret)); > ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp); > } > @@ -721,7 +721,7 @@ static int parse_playlist(HLSContext *c, const char *url, > } else if (ret < 0) { > if (ret != AVERROR_EOF) > av_log(c->ctx, AV_LOG_WARNING, > -"keepalive request failed for '%s' when parsing > playlist, retrying with new connection: %s\n", > +"keepalive request failed for '%s' with error: '%s' when > parsing playlist\n", > url, av_err2str(ret)); > in = NULL; > } > @@ -1483,7 +1483,7 @@ reload: > if (ret < 0) { > if (ff_check_interrupt(c->interrupt_callback)) > return AVERROR_EXIT; > -av_log(v->parent, AV_LOG_WARNING, "Failed to open segment %d of > playlist %d\n", > +av_log(v->parent, AV_LOG_WARNING, "Failed to open next segment > %d of playlist %d\n", >v->cur_seq_no + 1, >v->index); > } else { > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". patchset LGTM Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V2] avformat/dashdec: fix pointer being freed was not allocated
> 在 2019年9月14日,02:01,vectronic 写道: > > prevent attempt to call xmlFree if val was not allocated > > fixes: 8135 > Signed-off-by: vectronic > --- > libavformat/dashdec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > index 4f725ba09a..4753477fd9 100644 > --- a/libavformat/dashdec.c > +++ b/libavformat/dashdec.c > @@ -1185,6 +1185,7 @@ static int parse_programinformation(AVFormatContext *s, > xmlNodePtr node) > > node = xmlFirstElementChild(node); > while (node) { > +val = NULL; > if (!av_strcasecmp(node->name, "Title")) { > val = xmlNodeGetContent(node); > if (val) { > -- > 2.20.1 (Apple Git-117) > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe”. What about add it here: 1174 static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) 1175 { 1176 xmlChar *val = NULL; 1177 1178 node = xmlFirstElementChild(node); 1179 while (node) { 1180 if (!av_strcasecmp(node->name, "Title")) { 1181 val = xmlNodeGetContent(node); 1182 if (val) { 1183 av_dict_set(&s->metadata, "Title", val, 0); 1184 } 1185 } else if (!av_strcasecmp(node->name, "Source")) { 1186 val = xmlNodeGetContent(node); 1187 if (val) { 1188 av_dict_set(&s->metadata, "Source", val, 0); 1189 } 1190 } else if (!av_strcasecmp(node->name, "Copyright")) { 1191 val = xmlNodeGetContent(node); 1192 if (val) { 1193 av_dict_set(&s->metadata, "Copyright", val, 0); 1194 } 1195 } 1196 node = xmlNextElementSibling(node); 1197 xmlFree(val); + 1198 val = NULL; 1199 } 1200 return 0; 1201 } Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 25/25] hwcontext_drm: do not require drm device
On Thu, Sep 12, 2019 at 5:05 PM Mark Thompson wrote: > On 03/09/2019 02:02, Aman Gupta wrote: > > From: Jonas Karlman > > > > This allows the cli to create a dummy drm hwcontext > > that can be shared between the v4l2 decoder/scaler/encoder. > > > > This is especially useful on older RPI3 where /dev/dri devices > > are not available in the default configuration. > > > > Signed-off-by: Jonas Karlman > > Signed-off-by: Aman Gupta > > --- > > libavutil/hwcontext_drm.c | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/libavutil/hwcontext_drm.c b/libavutil/hwcontext_drm.c > > index 32cbde82eb..aa4794c5e6 100644 > > --- a/libavutil/hwcontext_drm.c > > +++ b/libavutil/hwcontext_drm.c > > @@ -43,6 +43,11 @@ static int drm_device_create(AVHWDeviceContext > *hwdev, const char *device, > > AVDRMDeviceContext *hwctx = hwdev->hwctx; > > drmVersionPtr version; > > > > +if (device == NULL) { > > + hwctx->fd = -1; > > + return 0; > > +} > > + > > hwctx->fd = open(device, O_RDWR); > > if (hwctx->fd < 0) > > return AVERROR(errno); > > > > This smells like a hack for making something work in the ffmpeg > command-line utility. Can you explain the use-case? If necessary, > modifying the behaviour of ffmpeg would probably be better than putting > this sort of thing into the library. > Since this v4l2 decoder can output either software frames or DRM frames, this allows using the CLI to switch between the two modes. i.e.: ffmpeg -c:v h264_v4l2m2m -i sample.mpg vs ./ffmpeg -hwaccel drm -hwaccel_output_format drm_prime -c:v h264_v4l2m2m -i sample.mpg This is also why I made the decoder define itself as AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX, so it was possible to use the CLI to trigger the DRM prime decoding mode. It sounds like it might be better to define a new v4l2 hwaccel/hwdevice, and maybe just return EINVAL from it's map/transfer methods since those are not applicable? Aman > > - Mark > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/v4l2_m2m_enc: check for V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME availability before using
From: Aman Gupta Signed-off-by: Aman Gupta --- libavcodec/v4l2_m2m_enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c index 4849bc26c5..474e6bef89 100644 --- a/libavcodec/v4l2_m2m_enc.c +++ b/libavcodec/v4l2_m2m_enc.c @@ -245,8 +245,10 @@ static int v4l2_send_frame(AVCodecContext *avctx, const AVFrame *frame) V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; V4L2Context *const output = &s->output; +#ifdef V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME if (frame && frame->pict_type == AV_PICTURE_TYPE_I) v4l2_set_ext_ctrl(s, MPEG_CID(FORCE_KEY_FRAME), 0, "force key frame"); +#endif return ff_v4l2_context_enqueue_frame(output, frame); } -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] FW: [PATCH] Add option to log timing
2019.09.13. 12:05 keltezéssel, Gyan írta: On 13-09-2019 03:10 AM, Soft Works wrote: -Original Message- From: ffmpeg-devel On Behalf Of Michael Niedermayer Sent: Thursday, September 12, 2019 11:29 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] FW: [PATCH] Add option to log timing On Wed, Sep 11, 2019 at 08:43:36PM +, Soft Works wrote: Michael - you probably missed my question... -Original Message- From: Soft Works Sent: Friday, September 6, 2019 11:44 PM To: FFmpeg development discussions and patches Subject: RE: [FFmpeg-devel] [PATCH] Add option to log timing From: ffmpeg-devel On Behalf Of Michael Niedermayer Sent: Friday, September 6, 2019 8:56 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Add option to log timing On Wed, Sep 04, 2019 at 07:35:11PM +, Soft Works wrote: Why this restriction? I think all log lines should be start with time/date if corresponding flag is present. This makes the log to be easy to parse by scripts. Initially I didn’t have this restriction, but it doesn’t work well together with some multi-line logging. See below for an example. To get this nice, it would require a larger amount of changes, and probably result in something that nobody wants to merge in. Anyway, there’s a flag controlling this behavior and if you really want, you can set it. Then you’ll see something like this: [...] i just enabled prefixes for all calls, and i get this: [] libavutil 56. 35.100 / 56. 35.100 [] libavcodec 58. 56.101 / 58. 56.101 [...] This looks much better than your example, so i have to disagree that theres a problem for calls during startup or some requirment of high complexity I need to apologize. I had been driven by another complication that exists in my branch but not in the ffmpeg trunk. I will submit an updated patch. What would you prefer - should I: 1. Activate the flag for adding log timing during startup by default (to allow opt-out behavior from the command line) or 2. Remove that flag and add log timing either all or nothing depending On the other two flags? i think i dont understand the question fully The default behavior should not change there could be one or 2 flags that control the timestamp output, yes What I meant was whether to keep that third flag for controlling whether the timing should be printed from the very first line (default) or just be printed once transcoding has started. I prefer from startup - timeline of input probing can be helpful. +1 vote Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/cbs_misc: remove anonymous union for gcc4.4 compat
From: Aman Gupta Signed-off-by: Aman Gupta --- libavcodec/cbs_misc.c | 14 +++--- libavcodec/cbs_misc.h | 4 ++-- libavcodec/cbs_misc_syntax_template.c | 8 libavcodec/h264_metadata_bsf.c| 4 ++-- libavcodec/mpeg2_metadata_bsf.c | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/libavcodec/cbs_misc.c b/libavcodec/cbs_misc.c index d0ced562f5..09324949f6 100644 --- a/libavcodec/cbs_misc.c +++ b/libavcodec/cbs_misc.c @@ -150,10 +150,10 @@ int ff_cbs_read_a53_cc_side_data(CodedBitstreamContext *ctx, *data = (A53UserData) { .user_identifier = A53_USER_IDENTIFIER_ATSC, -.atsc = { +.u = { .atsc = { .user_data_type_code = A53_USER_DATA_TYPE_CODE_CC_DATA, -.cc_data = { +.u = { .cc_data = { .process_em_data_flag = 0, .process_cc_data_flag = 1, .additional_data_flag = 0, @@ -161,10 +161,10 @@ int ff_cbs_read_a53_cc_side_data(CodedBitstreamContext *ctx, .em_data = 0, .cc_count = cc_count, -}, -}, +} }, +} }, }; -cc = &data->atsc.cc_data; +cc = &data->u.atsc.u.cc_data; err = init_get_bits(&gbc, side_data, 8 * side_data_size); if (err < 0) @@ -190,10 +190,10 @@ int ff_cbs_write_a53_cc_side_data(CodedBitstreamContext *ctx, int err, i; if (data->user_identifier != A53_USER_IDENTIFIER_ATSC || -data->atsc.user_data_type_code != A53_USER_DATA_TYPE_CODE_CC_DATA) +data->u.atsc.user_data_type_code != A53_USER_DATA_TYPE_CODE_CC_DATA) return AVERROR(EINVAL); -cc = &data->atsc.cc_data; +cc = &data->u.atsc.u.cc_data; err = av_reallocp(side_data, *side_data_size + 3 * cc->cc_count); if (err < 0) diff --git a/libavcodec/cbs_misc.h b/libavcodec/cbs_misc.h index 0d7ab2c8e7..b434ab86cc 100644 --- a/libavcodec/cbs_misc.h +++ b/libavcodec/cbs_misc.h @@ -70,7 +70,7 @@ typedef struct A53ATSCUserData { union { CEA708CCData cc_data; A53BarData bar_data; -}; +} u; } A53ATSCUserData; typedef struct A53AFDData { @@ -83,7 +83,7 @@ typedef struct A53UserData { union { A53ATSCUserData atsc; A53AFDData afd; -}; +} u; } A53UserData; diff --git a/libavcodec/cbs_misc_syntax_template.c b/libavcodec/cbs_misc_syntax_template.c index 7b98c7cc85..60ece42aef 100644 --- a/libavcodec/cbs_misc_syntax_template.c +++ b/libavcodec/cbs_misc_syntax_template.c @@ -99,9 +99,9 @@ static int FUNC(a53_atsc_user_data)(CodedBitstreamContext *ctx, RWContext *rw, switch (current->user_data_type_code) { case A53_USER_DATA_TYPE_CODE_CC_DATA: -return FUNC(cea708_cc_data)(ctx, rw, ¤t->cc_data); +return FUNC(cea708_cc_data)(ctx, rw, ¤t->u.cc_data); case A53_USER_DATA_TYPE_CODE_BAR_DATA: -return FUNC(a53_bar_data)(ctx, rw, ¤t->bar_data); +return FUNC(a53_bar_data)(ctx, rw, ¤t->u.bar_data); default: av_log(ctx->log_ctx, AV_LOG_WARNING, "Unknown ATSC user data found: type code %#02x.\n", @@ -137,9 +137,9 @@ static int FUNC(a53_user_data)(CodedBitstreamContext *ctx, RWContext *rw, switch (current->user_identifier) { case A53_USER_IDENTIFIER_ATSC: -return FUNC(a53_atsc_user_data)(ctx, rw, ¤t->atsc); +return FUNC(a53_atsc_user_data)(ctx, rw, ¤t->u.atsc); case A53_USER_IDENTIFIER_AFD: -return FUNC(a53_afd_data)(ctx, rw, ¤t->afd); +return FUNC(a53_afd_data)(ctx, rw, ¤t->u.afd); default: av_log(ctx->log_ctx, AV_LOG_WARNING, "Unknown registered user data found: identifier %#08x.\n", diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index 65c7b7b55e..7c890508dd 100644 --- a/libavcodec/h264_metadata_bsf.c +++ b/libavcodec/h264_metadata_bsf.c @@ -579,7 +579,7 @@ static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *pkt) }; H264RawSEIUserDataRegistered *udr = &payload.payload.user_data_registered; -size_t size = 9 + 3 * a53_ud.atsc.cc_data.cc_count; +size_t size = 9 + 3 * a53_ud.u.atsc.u.cc_data.cc_count; udr->data_ref = av_buffer_alloc(2 + size); if (!udr->data_ref) { @@ -639,7 +639,7 @@ static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *pkt) continue; } if (a53_ud.user_identifier != A53_USER_IDENTIFIER_ATSC || -a53_ud.atsc.user_data_type_code != +a53_ud.u.atsc.user_data_type_code != A53_USER_DATA_TYPE_CODE_CC_DATA) { // Valid but something else (e.g. AFD). continue; diff --git a/libavcodec/mpeg2_metadata_bsf.c b/libavcodec/mpeg2_metadata_bsf.c index e82758d2eb..92db608
Re: [FFmpeg-devel] FW: [PATCH] Add option to log timing
On Thu, Sep 12, 2019 at 09:40:48PM +, Soft Works wrote: > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of > > Michael Niedermayer > > Sent: Thursday, September 12, 2019 11:29 PM > > To: FFmpeg development discussions and patches > de...@ffmpeg.org> > > Subject: Re: [FFmpeg-devel] FW: [PATCH] Add option to log timing > > > > On Wed, Sep 11, 2019 at 08:43:36PM +, Soft Works wrote: > > > Michael - you probably missed my question... > > > > > > -Original Message- > > > From: Soft Works > > > Sent: Friday, September 6, 2019 11:44 PM > > > To: FFmpeg development discussions and patches > > > > > > Subject: RE: [FFmpeg-devel] [PATCH] Add option to log timing > > > > > > > From: ffmpeg-devel On Behalf Of > > > > Michael Niedermayer > > > > Sent: Friday, September 6, 2019 8:56 PM > > > > To: FFmpeg development discussions and patches > > > de...@ffmpeg.org> > > > > Subject: Re: [FFmpeg-devel] [PATCH] Add option to log timing > > > > > > > > On Wed, Sep 04, 2019 at 07:35:11PM +, Soft Works wrote: > > > > > > > > > > > Why this restriction? I think all log lines should be start with > > > > > > time/date if corresponding flag is present. This makes the log > > > > > > to be easy to parse by scripts. > > > > > > > > > > Initially I didn’t have this restriction, but it doesn’t work well > > > > > together with > > > > some multi-line logging. > > > > > See below for an example. > > > > > > > > > > To get this nice, it would require a larger amount of changes, and > > > > > probably > > > > result in something that nobody wants to merge in. > > > > > > > > > > Anyway, there’s a flag controlling this behavior and if you really > > > > > want, you > > > > can set it. > > > > > Then you’ll see something like this: > > > > > > [...] > > > > > > > i just enabled prefixes for all calls, and i get this: > > > > > > > > [] libavutil 56. 35.100 / 56. 35.100 > > > > [] libavcodec 58. 56.101 / 58. 56.101 > > > > > > [...] > > > > > > > > > > > This looks much better than your example, so i have to disagree that > > > > theres a problem for calls during startup or some requirment of high > > > > complexity > > > > > > I need to apologize. I had been driven by another complication that exists > > in my branch but not in the ffmpeg trunk. > > > > > > > > > I will submit an updated patch. > > > > > > What would you prefer - should I: > > > > > > 1. Activate the flag for adding log timing during startup by default > > > (to allow opt-out behavior from the command line) or 2. Remove that > > > flag and add log timing either all or nothing depending > > >On the other two flags? > > > > i think i dont understand the question fully > > > > The default behavior should not change > > there could be one or 2 flags that control the timestamp output, yes > > What I meant was whether to keep that third flag for controlling whether > the timing should be printed from the very first line (default) or just > be printed once transcoding has started. if the timing is needed, printing it from the very begin seems more "expected". What is the usecase for not prining it from thr very start ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: Only allow 0x11110000 pix_fmt_id for bayer mode
On Fri, Sep 13, 2019 at 12:08:42PM +0200, Paul B Mahol wrote: > ok will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Any man who breaks a law that conscience tells him is unjust and willingly accepts the penalty by staying in jail in order to arouse the conscience of the community on the injustice of the law is at that moment expressing the very highest respect for law. - Martin Luther King Jr signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/mjpegdec: Restore non bayer checks in ljpeg_decode_rgb_scan()
On Fri, Sep 13, 2019 at 12:08:18PM +0200, Paul B Mahol wrote: > ok will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/4] h264_metadata: Add support for A/53 closed captions
Am Fr., 13. Sept. 2019 um 20:28 Uhr schrieb Michael Niedermayer : > > On Wed, Sep 11, 2019 at 11:56:08AM -0700, Aman Gupta wrote: > > From: Mark Thompson > > > > Allows insertion (from side data), extraction (to side data), and removal > > of closed captions in SEI messages. > > --- > > libavcodec/Makefile| 2 +- > > libavcodec/h264_metadata_bsf.c | 133 + > > 2 files changed, 134 insertions(+), 1 deletion(-) > > breaks build on mips > > CC libavcodec/cbs_misc.o > In file included from src/libavcodec/cbs_misc.c:25: > src/libavcodec/cbs_misc.h:73: warning: declaration does not declare anything > src/libavcodec/cbs_misc.h:86: warning: declaration does not declare anything I can confirm that gcc-4.4.6 (which passes fate here with current FFmpeg) does not support these (anonymous?) unions. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/4] h264_metadata: Add support for A/53 closed captions
On Wed, Sep 11, 2019 at 11:56:08AM -0700, Aman Gupta wrote: > From: Mark Thompson > > Allows insertion (from side data), extraction (to side data), and removal > of closed captions in SEI messages. > --- > libavcodec/Makefile| 2 +- > libavcodec/h264_metadata_bsf.c | 133 + > 2 files changed, 134 insertions(+), 1 deletion(-) breaks build on mips CC libavcodec/cbs_misc.o In file included from src/libavcodec/cbs_misc.c:25: src/libavcodec/cbs_misc.h:73: warning: declaration does not declare anything src/libavcodec/cbs_misc.h:86: warning: declaration does not declare anything In file included from src/libavcodec/cbs_misc.c:57: src/libavcodec/cbs_misc_syntax_template.c: In function ‘cbs_misc_read_a53_atsc_user_data’: src/libavcodec/cbs_misc_syntax_template.c:102: error: ‘A53ATSCUserData’ has no member named ‘cc_data’ src/libavcodec/cbs_misc_syntax_template.c:104: error: ‘A53ATSCUserData’ has no member named ‘bar_data’ src/libavcodec/cbs_misc_syntax_template.c: In function ‘cbs_misc_read_a53_user_data’: src/libavcodec/cbs_misc_syntax_template.c:140: error: ‘A53UserData’ has no member named ‘atsc’ src/libavcodec/cbs_misc_syntax_template.c:142: error: ‘A53UserData’ has no member named ‘afd’ In file included from src/libavcodec/cbs_misc.c:82: src/libavcodec/cbs_misc_syntax_template.c: In function ‘cbs_misc_write_a53_atsc_user_data’: src/libavcodec/cbs_misc_syntax_template.c:102: error: ‘A53ATSCUserData’ has no member named ‘cc_data’ src/libavcodec/cbs_misc_syntax_template.c:104: error: ‘A53ATSCUserData’ has no member named ‘bar_data’ src/libavcodec/cbs_misc_syntax_template.c: In function ‘cbs_misc_write_a53_user_data’: src/libavcodec/cbs_misc_syntax_template.c:140: error: ‘A53UserData’ has no member named ‘atsc’ src/libavcodec/cbs_misc_syntax_template.c:142: error: ‘A53UserData’ has no member named ‘afd’ src/libavcodec/cbs_misc.c: In function ‘ff_cbs_read_a53_cc_side_data’: src/libavcodec/cbs_misc.c:153: error: unknown field ‘atsc’ specified in initializer src/libavcodec/cbs_misc.c:153: error: extra brace group at end of initializer src/libavcodec/cbs_misc.c:153: error: (near initialization for ‘(anonymous)’) src/libavcodec/cbs_misc.c:156: error: extra brace group at end of initializer src/libavcodec/cbs_misc.c:156: error: (near initialization for ‘(anonymous)’) src/libavcodec/cbs_misc.c:165: warning: excess elements in struct initializer src/libavcodec/cbs_misc.c:165: warning: (near initialization for ‘(anonymous)’) src/libavcodec/cbs_misc.c:167: error: ‘A53UserData’ has no member named ‘atsc’ src/libavcodec/cbs_misc.c: In function ‘ff_cbs_write_a53_cc_side_data’: src/libavcodec/cbs_misc.c:193: error: ‘A53UserData’ has no member named ‘atsc’ src/libavcodec/cbs_misc.c:196: error: ‘A53UserData’ has no member named ‘atsc’ make: *** [libavcodec/cbs_misc.o] Error 1 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V2] avformat/dashdec: fix pointer being freed was not allocated
prevent attempt to call xmlFree if val was not allocated fixes: 8135 Signed-off-by: vectronic --- libavformat/dashdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 4f725ba09a..4753477fd9 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1185,6 +1185,7 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) node = xmlFirstElementChild(node); while (node) { +val = NULL; if (!av_strcasecmp(node->name, "Title")) { val = xmlNodeGetContent(node); if (val) { -- 2.20.1 (Apple Git-117) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/dashdec: fix range parsing causing issues with http byte range requests
data size calculation was off by one as per DASH SPEC which references RFC 7233. this was then used in http byte range request causing data corruption when parsing media files referenced in manifest fixes: 8136 Signed-off-by: vectronic --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 74eb900eea..aa0e3598a1 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -600,7 +600,7 @@ static struct fragment * get_Fragment(char *range) char *str_end_offset; char *str_offset = av_strtok(range, "-", &str_end_offset); seg->url_offset = strtoll(str_offset, NULL, 10); -seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset; +seg->size = strtoll(str_end_offset, NULL, 10) - seg->url_offset + 1; } return seg; -- 2.20.1 (Apple Git-117) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/dashdec: fix segfault when parsing segmentlist
Am Fr., 13. Sept. 2019 um 18:36 Uhr schrieb vectronic : > > index into segmentlists_tab was specified as 4 instead of 3 causing invalid > access > > further fix to: 7976 This looks unrelated to the backtrace provided in ticket #7976. > Signed-off-by: vectronic > --- > libavformat/dashdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > index 4f725ba09a..6a44912248 100644 > --- a/libavformat/dashdec.c > +++ b/libavformat/dashdec.c > @@ -1017,7 +1017,7 @@ static int > parse_manifest_representation(AVFormatContext *s, const char *url, > > duration_val = get_val_from_nodes_tab(segmentlists_tab, 3, > "duration"); > timescale_val = get_val_from_nodes_tab(segmentlists_tab, 3, > "timescale"); > -startnumber_val = get_val_from_nodes_tab(segmentlists_tab, 4, > "startNumber"); > +startnumber_val = get_val_from_nodes_tab(segmentlists_tab, 3, > "startNumber"); > if (duration_val) { > rep->fragment_duration = (int64_t) strtoll(duration_val, > NULL, 10); > av_log(s, AV_LOG_TRACE, "rep->fragment_duration = > [%"PRId64"]\n", rep->fragment_duration); Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/dashdec: fix pointer being freed was not allocated
Am Fr., 13. Sept. 2019 um 18:34 Uhr schrieb vectronic : > > prevent attempt to call xmlFree if val was not allocated > > fixes: 8135 > Signed-off-by: vectronic > --- > libavformat/dashdec.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > index 4f725ba09a..8022ba9afe 100644 > --- a/libavformat/dashdec.c > +++ b/libavformat/dashdec.c > @@ -1185,6 +1185,7 @@ static int parse_programinformation(AVFormatContext *s, > xmlNodePtr node) > > node = xmlFirstElementChild(node); > while (node) { > +val = NULL; > if (!av_strcasecmp(node->name, "Title")) { > val = xmlNodeGetContent(node); > if (val) { This part of the patch is sufficient afaict. > @@ -1202,7 +1203,9 @@ static int parse_programinformation(AVFormatContext *s, > xmlNodePtr node) > } > } > node = xmlNextElementSibling(node); > -xmlFree(val); > +if (val) { > +xmlFree(val); > +} This - fortunately - seems unneeded. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/dashdec: fix segfault when parsing segmentlist
index into segmentlists_tab was specified as 4 instead of 3 causing invalid access further fix to: 7976 Signed-off-by: vectronic --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 4f725ba09a..6a44912248 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1017,7 +1017,7 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url, duration_val = get_val_from_nodes_tab(segmentlists_tab, 3, "duration"); timescale_val = get_val_from_nodes_tab(segmentlists_tab, 3, "timescale"); -startnumber_val = get_val_from_nodes_tab(segmentlists_tab, 4, "startNumber"); +startnumber_val = get_val_from_nodes_tab(segmentlists_tab, 3, "startNumber"); if (duration_val) { rep->fragment_duration = (int64_t) strtoll(duration_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->fragment_duration = [%"PRId64"]\n", rep->fragment_duration); -- 2.20.1 (Apple Git-117) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/dashdec: fix pointer being freed was not allocated
prevent attempt to call xmlFree if val was not allocated fixes: 8135 Signed-off-by: vectronic --- libavformat/dashdec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 4f725ba09a..8022ba9afe 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1185,6 +1185,7 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) node = xmlFirstElementChild(node); while (node) { +val = NULL; if (!av_strcasecmp(node->name, "Title")) { val = xmlNodeGetContent(node); if (val) { @@ -1202,7 +1203,9 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) } } node = xmlNextElementSibling(node); -xmlFree(val); +if (val) { +xmlFree(val); +} } return 0; } -- 2.20.1 (Apple Git-117) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/dashdec: fix pointer being freed was not allocated
prevent attempt to call xmlFree if val was not allocated fixes: 8135 Signed-off-by: vectronic --- libavformat/dashdec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 4f725ba09a..8022ba9afe 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1185,6 +1185,7 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) node = xmlFirstElementChild(node); while (node) { +val = NULL; if (!av_strcasecmp(node->name, "Title")) { val = xmlNodeGetContent(node); if (val) { @@ -1202,7 +1203,9 @@ static int parse_programinformation(AVFormatContext *s, xmlNodePtr node) } } node = xmlNextElementSibling(node); -xmlFree(val); +if (val) { +xmlFree(val); +} } return 0; } -- 2.20.1 (Apple Git-117) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH, v2 1/6] lavu/pixfmt: add new pixel format ayuv/y210/y410
Am Fr., 13. Sept. 2019 um 18:13 Uhr schrieb Fu, Linjie : > > > -Original Message- > > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > > Of Michael Niedermayer > > Sent: Friday, September 13, 2019 23:11 > > To: FFmpeg development discussions and patches > de...@ffmpeg.org> > > Subject: Re: [FFmpeg-devel] [PATCH, v2 1/6] lavu/pixfmt: add new pixel > > format ayuv/y210/y410 > > > > On Thu, Sep 12, 2019 at 12:28:41AM +0800, Linjie Fu wrote: > > > Previously, media driver provided planar format(like 420 8 bit), > > > but for HEVC Range Extension (422/444 8/10 bit), the decoded image > > > is produced in packed format because Windows expects it. > > > > > > Add some packed pixel formats for hardware decode support in VAAPI > > > and QSV: > > > > > > 4:2:2 10 bit: Y210 > > > 4:4:4 8 bit: AYUV > > > 4:4:4 10 bit: Y410 > > > > > > Signed-off-by: Linjie Fu > > > --- > > > libavutil/pixdesc.c | 62 > > +++ > > > libavutil/pixfmt.h| 9 +++ > > > libavutil/tests/pixfmt_best.c | 1 + > > > libavutil/version.h | 2 +- > > > 4 files changed, 73 insertions(+), 1 deletion(-) > > > > breaks fate > > > > --- ./tests/ref/fate/pixfmt_best 2019-09-11 20:36:09.435012759 +0200 > > +++ tests/data/fate/pixfmt_best 2019-09-13 17:09:53.430392453 +0200 > > @@ -1 +1 @@ > > -73 tests passed, 0 tests failed. > > +74 tests passed, 0 tests failed. > > Test pixfmt_best failed. Look at tests/data/fate/pixfmt_best.err for > > details. > > make: *** [fate-pixfmt_best] Error 1 > > > > If I didn't get anything missed in the upstream patch, this patch set has > passed > the pre-patch check in https://github.com/intel-media-ci/ffmpeg/pull/88, > which includes the fate check. Apparently not. > Above fate breaking will gone after applying patch 3/6 in the patch set: > https://patchwork.ffmpeg.org/patch/15007/ This indicates you have to merge part(s) of the patches. The idea is of course that no patch breaks fate. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH, v2 1/6] lavu/pixfmt: add new pixel format ayuv/y210/y410
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Michael Niedermayer > Sent: Friday, September 13, 2019 23:11 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH, v2 1/6] lavu/pixfmt: add new pixel > format ayuv/y210/y410 > > On Thu, Sep 12, 2019 at 12:28:41AM +0800, Linjie Fu wrote: > > Previously, media driver provided planar format(like 420 8 bit), > > but for HEVC Range Extension (422/444 8/10 bit), the decoded image > > is produced in packed format because Windows expects it. > > > > Add some packed pixel formats for hardware decode support in VAAPI > > and QSV: > > > > 4:2:2 10 bit: Y210 > > 4:4:4 8 bit: AYUV > > 4:4:4 10 bit: Y410 > > > > Signed-off-by: Linjie Fu > > --- > > libavutil/pixdesc.c | 62 > +++ > > libavutil/pixfmt.h| 9 +++ > > libavutil/tests/pixfmt_best.c | 1 + > > libavutil/version.h | 2 +- > > 4 files changed, 73 insertions(+), 1 deletion(-) > > breaks fate > > --- ./tests/ref/fate/pixfmt_best 2019-09-11 20:36:09.435012759 +0200 > +++ tests/data/fate/pixfmt_best 2019-09-13 17:09:53.430392453 +0200 > @@ -1 +1 @@ > -73 tests passed, 0 tests failed. > +74 tests passed, 0 tests failed. > Test pixfmt_best failed. Look at tests/data/fate/pixfmt_best.err for details. > make: *** [fate-pixfmt_best] Error 1 > If I didn't get anything missed in the upstream patch, this patch set has passed the pre-patch check in https://github.com/intel-media-ci/ffmpeg/pull/88, which includes the fate check. Above fate breaking will gone after applying patch 3/6 in the patch set: https://patchwork.ffmpeg.org/patch/15007/ diff --git a/tests/ref/fate/pixfmt_best b/tests/ref/fate/pixfmt_best index 5f51e2d..1da1846 100644 --- a/tests/ref/fate/pixfmt_best +++ b/tests/ref/fate/pixfmt_best @@ -1 +1 @@ -73 tests passed, 0 tests failed. +74 tests passed, 0 tests failed. Thanks for the kindly verify. - linjie ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH, v2 1/6] lavu/pixfmt: add new pixel format ayuv/y210/y410
On Thu, Sep 12, 2019 at 12:28:41AM +0800, Linjie Fu wrote: > Previously, media driver provided planar format(like 420 8 bit), > but for HEVC Range Extension (422/444 8/10 bit), the decoded image > is produced in packed format because Windows expects it. > > Add some packed pixel formats for hardware decode support in VAAPI > and QSV: > > 4:2:2 10 bit: Y210 > 4:4:4 8 bit: AYUV > 4:4:4 10 bit: Y410 > > Signed-off-by: Linjie Fu > --- > libavutil/pixdesc.c | 62 > +++ > libavutil/pixfmt.h| 9 +++ > libavutil/tests/pixfmt_best.c | 1 + > libavutil/version.h | 2 +- > 4 files changed, 73 insertions(+), 1 deletion(-) breaks fate --- ./tests/ref/fate/pixfmt_best2019-09-11 20:36:09.435012759 +0200 +++ tests/data/fate/pixfmt_best 2019-09-13 17:09:53.430392453 +0200 @@ -1 +1 @@ -73 tests passed, 0 tests failed. +74 tests passed, 0 tests failed. Test pixfmt_best failed. Look at tests/data/fate/pixfmt_best.err for details. make: *** [fate-pixfmt_best] Error 1 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V2] lavu/qsv: remove the redundant libmfx init code
> From: ffmpeg-devel On Behalf Of Mark > Thompson > Sent: Wednesday, September 11, 2019 6:34 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH V2] lavu/qsv: remove the redundant libmfx > init code > > On 05/09/2019 06:24, Zhong Li wrote: > > Signed-off-by: Zhong Li > > --- > > libavutil/hwcontext_qsv.c | 24 ++-- > > 1 file changed, 2 insertions(+), 22 deletions(-) > > > > diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c > > index 0329a81..1c0e4ff 100644 > > --- a/libavutil/hwcontext_qsv.c > > +++ b/libavutil/hwcontext_qsv.c > > @@ -1145,27 +1145,6 @@ static int > > qsv_device_derive_from_child(AVHWDeviceContext *ctx, > > > > err = MFXInit(implementation, &ver, &hwctx->session); > > if (err != MFX_ERR_NONE) { > > -av_log(ctx, AV_LOG_ERROR, "Error initializing an MFX session: " > > - "%d.\n", err); > > -ret = AVERROR_UNKNOWN; > > -goto fail; > > -} > > - > > -err = MFXQueryVersion(hwctx->session, &ver); > > -if (err != MFX_ERR_NONE) { > > -av_log(ctx, AV_LOG_ERROR, "Error querying an MFX session: %d.\n", > > err); > > -ret = AVERROR_UNKNOWN; > > -goto fail; > > -} > > - > > -av_log(ctx, AV_LOG_VERBOSE, > > - "Initialize MFX session: API version is %d.%d, implementation > > version > is %d.%d\n", > > - MFX_VERSION_MAJOR, MFX_VERSION_MINOR, ver.Major, ver.Minor); > > - > > -MFXClose(hwctx->session); > > - > > -err = MFXInit(implementation, &ver, &hwctx->session); > > -if (err != MFX_ERR_NONE) { > > av_log(ctx, AV_LOG_ERROR, > > "Error initializing an MFX session: %d.\n", err); > > ret = AVERROR_UNKNOWN; > > @@ -1182,7 +1161,8 @@ static int > > qsv_device_derive_from_child(AVHWDeviceContext *ctx, > > > > ret = MFXQueryVersion(hwctx->session,&ver); > > if (ret == MFX_ERR_NONE) { > > -av_log(ctx, AV_LOG_VERBOSE, "MFX compile/runtime > API: %d.%d/%d.%d\n", > > +av_log(ctx, AV_LOG_VERBOSE, > > + "Initialize MFX session: API version is %d.%d, > > + implementation version is %d.%d\n", > > MFX_VERSION_MAJOR, MFX_VERSION_MINOR, ver.Major, ver.Minor); > > } > > return 0; > > > > Can you add some more explanation? The extra session checking the version is > not obviously redundant, and the commit log does indicate that the setup was > deliberate: > > commit ccbb31c14b766ef666ef2daa8c467e478183a957 > Author: Luca Barbato > Date: Mon Sep 25 09:57:30 2017 + > > qsv: Make sure the session is set with the latest version > > It is needed to have the calls to MFXJoinSession succeed. > > > - Mark Thanks to point out this. So probably just need to remove the redundant MFXQueryVersion()? Will update the patch. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v1 2/2] avfilter/vf_minterpolate: change the default threshold to get better scenechange detect result
From: Limin Wang ./ffmpeg -loglevel debug -i ../fate-suite/svq3/Vertical400kbit.sorenson3.mov -vf minterpolate=fps=60:mi_mode=blend -an -f null - [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 1600 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 4120 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 5780 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 6700 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 8140 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 9740 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 14060 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 15680 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 18480 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 20020 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 21740 The results are consistent with tests/ref/fate/filter-metadata-scenedetect For the master, it'll detect more than 20 scene change for the same source. Signed-off-by: Limin Wang --- libavfilter/vf_minterpolate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index fc8054b..c9ce804 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -230,7 +230,7 @@ static const AVOption minterpolate_options[] = { { "scd", "scene change detection method", OFFSET(scd_method), AV_OPT_TYPE_INT, {.i64 = SCD_METHOD_FDIFF}, SCD_METHOD_NONE, SCD_METHOD_FDIFF, FLAGS, "scene" }, CONST("none", "disable detection", SCD_METHOD_NONE,"scene"), CONST("fdiff", "frame difference", SCD_METHOD_FDIFF, "scene"), -{ "scd_threshold", "scene change threshold", OFFSET(scd_threshold), AV_OPT_TYPE_DOUBLE, {.dbl = 5.0}, 0, 100.0, FLAGS }, +{ "scd_threshold", "scene change threshold", OFFSET(scd_threshold), AV_OPT_TYPE_DOUBLE, {.dbl = 10.}, 0, 100.0, FLAGS }, { NULL } }; @@ -1097,6 +1097,7 @@ static void interpolate(AVFilterLink *inlink, AVFrame *avf_out) } if (mi_ctx->scene_changed) { +av_log(ctx, AV_LOG_DEBUG, "scene changed, input pts %"PRId64"\n", mi_ctx->frames[1].avf->pts); /* duplicate frame */ av_frame_copy(avf_out, alpha > ALPHA_MAX / 2 ? mi_ctx->frames[2].avf : mi_ctx->frames[1].avf); return; -- 2.6.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 1/4] lavf/hls: refine the log message
From: Jun Zhao refine the log message, it's will help the debugging Signed-off-by: Jun Zhao --- libavformat/hls.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 61b6759..10fc568 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -664,7 +664,7 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, } else if (ret < 0) { if (ret != AVERROR_EOF) av_log(s, AV_LOG_WARNING, -"keepalive request failed for '%s' when opening url, retrying with new connection: %s\n", +"keepalive request failed for '%s' with error: '%s' when opening url, retrying with new connection\n", url, av_err2str(ret)); ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp); } @@ -721,7 +721,7 @@ static int parse_playlist(HLSContext *c, const char *url, } else if (ret < 0) { if (ret != AVERROR_EOF) av_log(c->ctx, AV_LOG_WARNING, -"keepalive request failed for '%s' when parsing playlist, retrying with new connection: %s\n", +"keepalive request failed for '%s' with error: '%s' when parsing playlist\n", url, av_err2str(ret)); in = NULL; } @@ -1483,7 +1483,7 @@ reload: if (ret < 0) { if (ff_check_interrupt(c->interrupt_callback)) return AVERROR_EXIT; -av_log(v->parent, AV_LOG_WARNING, "Failed to open segment %d of playlist %d\n", +av_log(v->parent, AV_LOG_WARNING, "Failed to open next segment %d of playlist %d\n", v->cur_seq_no + 1, v->index); } else { -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 4/4] lavf/hls: fix memory leak in error handling path for option tmp
From: Jun Zhao fix memory leak in error handling path for option tmp. Signed-off-by: Jun Zhao --- libavformat/hls.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index bb07dcb..0611ddc 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -620,9 +620,6 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, int ret; int is_http = 0; -av_dict_copy(&tmp, opts, 0); -av_dict_copy(&tmp, opts2, 0); - if (av_strstart(url, "crypto", NULL)) { if (url[6] == '+' || url[6] == ':') proto_name = avio_find_protocol_name(url + 7); @@ -655,9 +652,13 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, else if (strcmp(proto_name, "file") || !strncmp(url, "file,", 5)) return AVERROR_INVALIDDATA; +av_dict_copy(&tmp, opts, 0); +av_dict_copy(&tmp, opts2, 0); + if (is_http && c->http_persistent && *pb) { ret = open_url_keepalive(c->ctx, pb, url); if (ret == AVERROR_EXIT) { +av_dict_free(&tmp); return ret; } else if (ret < 0) { if (ret != AVERROR_EOF) -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 2/4] lavf/hls: drop unnecessary check before ff_format_io_close
From: Jun Zhao ff_format_io_close will check the AVIOContext pointer pb, so drop the unnecessary check before ff_format_io_close. Signed-off-by: Jun Zhao --- libavformat/hls.c | 18 ++ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 10fc568..b32940b 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -254,11 +254,9 @@ static void free_playlist_list(HLSContext *c) av_freep(&pls->init_sec_buf); av_packet_unref(&pls->pkt); av_freep(&pls->pb.buffer); -if (pls->input) -ff_format_io_close(c->ctx, &pls->input); +ff_format_io_close(c->ctx, &pls->input); pls->input_read_done = 0; -if (pls->input_next) -ff_format_io_close(c->ctx, &pls->input_next); +ff_format_io_close(c->ctx, &pls->input_next); pls->input_next_requested = 0; if (pls->ctx) { pls->ctx->pb = NULL; @@ -2006,11 +2004,9 @@ static int recheck_discard_flags(AVFormatContext *s, int first) } av_log(s, AV_LOG_INFO, "Now receiving playlist %d, segment %d\n", i, pls->cur_seq_no); } else if (first && !cur_needed && pls->needed) { -if (pls->input) -ff_format_io_close(pls->parent, &pls->input); +ff_format_io_close(pls->parent, &pls->input); pls->input_read_done = 0; -if (pls->input_next) -ff_format_io_close(pls->parent, &pls->input_next); +ff_format_io_close(pls->parent, &pls->input_next); pls->input_next_requested = 0; pls->needed = 0; changed = 1; @@ -2251,11 +2247,9 @@ static int hls_read_seek(AVFormatContext *s, int stream_index, for (i = 0; i < c->n_playlists; i++) { /* Reset reading */ struct playlist *pls = c->playlists[i]; -if (pls->input) -ff_format_io_close(pls->parent, &pls->input); +ff_format_io_close(pls->parent, &pls->input); pls->input_read_done = 0; -if (pls->input_next) -ff_format_io_close(pls->parent, &pls->input_next); +ff_format_io_close(pls->parent, &pls->input_next); pls->input_next_requested = 0; av_packet_unref(&pls->pkt); pls->pb.eof_reached = 0; -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 3/4] lavf/hls: remove redundancy seekable setting
From: Jun Zhao ffio_init_context with NULL seek callback will setting seekable with 0, so remove the redundancy seekable setting. Signed-off-by: Jun Zhao --- libavformat/hls.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index b32940b..bb07dcb 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1905,7 +1905,6 @@ static int hls_read_header(AVFormatContext *s) } ffio_init_context(&pls->pb, pls->read_buffer, INITIAL_BUFFER_SIZE, 0, pls, read_data, NULL, NULL); -pls->pb.seekable = 0; ret = av_probe_input_buffer(&pls->pb, &in_fmt, pls->segments[0]->url, NULL, 0, 0); if (ret < 0) { -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/mjpegdec: Restore non bayer checks in ljpeg_decode_rgb_scan()
ok On 9/12/19, Michael Niedermayer wrote: > Fixes: out of array write > Fixes: > 17088/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5654877765632000 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/mjpegdec.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c > index 5a80b7d289..f095afaed8 100644 > --- a/libavcodec/mjpegdec.c > +++ b/libavcodec/mjpegdec.c > @@ -1071,6 +1071,10 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext > *s, int nb_components, int p > int resync_mb_x = 0; > int vpred[6]; > > +if (!s->bayer && s->nb_components < 3) > +return AVERROR_INVALIDDATA; > +if (s->bayer && s->nb_components > 2) > +return AVERROR_INVALIDDATA; > if (s->nb_components <= 0 || s->nb_components > 4) > return AVERROR_INVALIDDATA; > if (s->v_max != 1 || s->h_max != 1 || !s->lossless) > -- > 2.23.0 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: Only allow 0x11110000 pix_fmt_id for bayer mode
ok On 9/12/19, Michael Niedermayer wrote: > Fixes: NULL pointer dereference > Fixes: assertion failure > Fixes: > 17003/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5696929253556224 > Fixes: > 17039/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5651008134316032 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/mjpegdec.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c > index 1f2fabe2df..5a80b7d289 100644 > --- a/libavcodec/mjpegdec.c > +++ b/libavcodec/mjpegdec.c > @@ -501,6 +501,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) > > switch (pix_fmt_id) { > case 0x: /* for bayer-encoded huffman lossless JPEGs > embedded in DNGs */ > +if (!s->bayer) > +goto unk_pixfmt; > s->avctx->pix_fmt = AV_PIX_FMT_GRAY16LE; > break; > case 0x1100: > -- > 2.23.0 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] FW: [PATCH] Add option to log timing
On 13-09-2019 03:10 AM, Soft Works wrote: -Original Message- From: ffmpeg-devel On Behalf Of Michael Niedermayer Sent: Thursday, September 12, 2019 11:29 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] FW: [PATCH] Add option to log timing On Wed, Sep 11, 2019 at 08:43:36PM +, Soft Works wrote: Michael - you probably missed my question... -Original Message- From: Soft Works Sent: Friday, September 6, 2019 11:44 PM To: FFmpeg development discussions and patches Subject: RE: [FFmpeg-devel] [PATCH] Add option to log timing From: ffmpeg-devel On Behalf Of Michael Niedermayer Sent: Friday, September 6, 2019 8:56 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Add option to log timing On Wed, Sep 04, 2019 at 07:35:11PM +, Soft Works wrote: Why this restriction? I think all log lines should be start with time/date if corresponding flag is present. This makes the log to be easy to parse by scripts. Initially I didn’t have this restriction, but it doesn’t work well together with some multi-line logging. See below for an example. To get this nice, it would require a larger amount of changes, and probably result in something that nobody wants to merge in. Anyway, there’s a flag controlling this behavior and if you really want, you can set it. Then you’ll see something like this: [...] i just enabled prefixes for all calls, and i get this: [] libavutil 56. 35.100 / 56. 35.100 [] libavcodec 58. 56.101 / 58. 56.101 [...] This looks much better than your example, so i have to disagree that theres a problem for calls during startup or some requirment of high complexity I need to apologize. I had been driven by another complication that exists in my branch but not in the ffmpeg trunk. I will submit an updated patch. What would you prefer - should I: 1. Activate the flag for adding log timing during startup by default (to allow opt-out behavior from the command line) or 2. Remove that flag and add log timing either all or nothing depending On the other two flags? i think i dont understand the question fully The default behavior should not change there could be one or 2 flags that control the timestamp output, yes What I meant was whether to keep that third flag for controlling whether the timing should be printed from the very first line (default) or just be printed once transcoding has started. I prefer from startup - timeline of input probing can be helpful. Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH NV HEADERS] Add cuCtxGetDevice
On 12/09/2019 15:19, Steve Lhomme wrote: It can be useful to determine if the decoder context is the same as the display context. It's used in some samples at https://github.com/NVIDIA/video-sdk-samples --- include/ffnvcodec/dynlink_cuda.h | 1 + include/ffnvcodec/dynlink_loader.h | 2 ++ 2 files changed, 3 insertions(+) applied ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH NV HEADERS] allow overriding the PREFIX from the environment
Ah yes, it works (TIL). Forget about this patch. On 2019-09-12 16:26, Timo Rothenpieler wrote: On 12/09/2019 15:17, Steve Lhomme wrote: --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a51c2c9..c3a9209 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PREFIX = /usr/local +PREFIX ?= /usr/local Overriding the prefix worked just fine last time I tested it. You do make install PREFIX=... LIBDIR = lib INSTALL = install SED = sed ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".