[FFmpeg-cvslog] libavformat/dashenc: Reduce confusion in par error message
ffmpeg | branch: master | Chris Miceli | Mon Aug 31 14:16:39 2020 +1000| [41366522899f209d116d663ebedf00e3282e7bb2] | committer: Michael Niedermayer libavformat/dashenc: Reduce confusion in par error message In ticket #8754 there is discourse surrounding the error message which is printed upon a mismatched aspect ratio in derived encodings. This should make it clearer to the user as to the issues which they are experiencing. Reviewed-by: "Jeyapal, Karthick" Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41366522899f209d116d663ebedf00e3282e7bb2 --- libavformat/dashenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index dc3306a56a..2d757b3a87 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -1686,7 +1686,7 @@ static int dash_init(AVFormatContext *s) 1024 * 1024); if (as->par.num && av_cmp_q(par, as->par)) { -av_log(s, AV_LOG_ERROR, "Conflicting stream par values in Adaptation Set %d\n", os->as_idx); +av_log(s, AV_LOG_ERROR, "Conflicting stream aspect ratios values in Adaptation Set %d. Please ensure all adaptation sets have the same aspect ratio\n", os->as_idx); return AVERROR(EINVAL); } as->par = par; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] libavfilter/dnn_backend_native: check mem allocation
ffmpeg | branch: master | Chris Miceli | Wed Oct 14 11:19:50 2020 +1100| [ad95e5e45dbb3c3dddc3e2c3fe93bc98f239bd29] | committer: Guo, Yejun libavfilter/dnn_backend_native: check mem allocation check that frame allocations return non-null. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad95e5e45dbb3c3dddc3e2c3fe93bc98f239bd29 --- libavfilter/dnn/dnn_backend_native.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_backend_native.c b/libavfilter/dnn/dnn_backend_native.c index d45e211f0c..4fc3ba2044 100644 --- a/libavfilter/dnn/dnn_backend_native.c +++ b/libavfilter/dnn/dnn_backend_native.c @@ -79,8 +79,23 @@ static DNNReturnType get_output_native(void *model, const char *input_name, int { DNNReturnType ret; NativeModel *native_model = (NativeModel *)model; +NativeContext *ctx = &native_model->ctx; AVFrame *in_frame = av_frame_alloc(); -AVFrame *out_frame = av_frame_alloc(); +AVFrame *out_frame = NULL; + +if (!in_frame) { +av_log(ctx, AV_LOG_ERROR, "Could not allocate memory for input frame\n"); +return DNN_ERROR; +} + +out_frame = av_frame_alloc(); + +if (!out_frame) { +av_log(ctx, AV_LOG_ERROR, "Could not allocate memory for output frame\n"); +av_frame_free(&in_frame); +return DNN_ERROR; +} + in_frame->width = input_width; in_frame->height = input_height; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] libavfilter/dnn/dnn_backend{openvino, tf}: check memory alloc non-NULL
ffmpeg | branch: master | Chris Miceli | Wed Oct 14 11:59:44 2020 +1100| [6bdfea8d4b3683605f47994e491770bc0bc6ce5d] | committer: Guo, Yejun libavfilter/dnn/dnn_backend{openvino, tf}: check memory alloc non-NULL These previously would not check that the return value was non-null meaning it was susceptible to a sigsegv. This checks those values. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6bdfea8d4b3683605f47994e491770bc0bc6ce5d --- libavfilter/dnn/dnn_backend_openvino.c | 14 +- libavfilter/dnn/dnn_backend_tf.c | 16 +++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c index 495225d0b3..d510e162c6 100644 --- a/libavfilter/dnn/dnn_backend_openvino.c +++ b/libavfilter/dnn/dnn_backend_openvino.c @@ -141,8 +141,20 @@ static DNNReturnType get_output_ov(void *model, const char *input_name, int inpu { DNNReturnType ret; OVModel *ov_model = (OVModel *)model; +OVContext *ctx = &ov_model->ctx; AVFrame *in_frame = av_frame_alloc(); -AVFrame *out_frame = av_frame_alloc(); +AVFrame *out_frame = NULL; + +if (!in_frame) { +av_log(ctx, AV_LOG_ERROR, "Failed to allocate memory for input frame\n"); +return DNN_ERROR; +} +out_frame = av_frame_alloc(); +if (!out_frame) { +av_log(ctx, AV_LOG_ERROR, "Failed to allocate memory for output frame\n"); +av_frame_free(&in_frame); +return DNN_ERROR; +} in_frame->width = input_width; in_frame->height = input_height; diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index be860b11b5..7923e1db69 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn/dnn_backend_tf.c @@ -159,8 +159,22 @@ static DNNReturnType get_output_tf(void *model, const char *input_name, int inpu { DNNReturnType ret; TFModel *tf_model = (TFModel *)model; +TFContext *ctx = &tf_model->ctx; AVFrame *in_frame = av_frame_alloc(); -AVFrame *out_frame = av_frame_alloc(); +AVFrame *out_frame = NULL; + +if (!in_frame) { +av_log(ctx, AV_LOG_ERROR, "Failed to allocate memory for input frame\n"); +return DNN_ERROR; +} + +out_frame = av_frame_alloc(); +if (!out_frame) { +av_log(ctx, AV_LOG_ERROR, "Failed to allocate memory for output frame\n"); +av_frame_free(&in_frame); +return DNN_ERROR; +} + in_frame->width = input_width; in_frame->height = input_height; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] libavformat/utils: Fix misleading indent
ffmpeg | branch: master | Chris Miceli | Tue Oct 13 15:59:06 2020 +1100| [be852803eb3b5628a45f91d298c924be038c2ff7] | committer: Michael Niedermayer libavformat/utils: Fix misleading indent 6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 introduced this and it was part of a very large merging of refactoring. Current behaviour is what is reflected by this indenting change, however my understanding of timing is such that this correct behaviour. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be852803eb3b5628a45f91d298c924be038c2ff7 --- libavformat/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index a2e701ea1a..e8335a601f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1186,8 +1186,7 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st, pktl->pkt.dts = cur_dts; if (!st->internal->avctx->has_b_frames) pktl->pkt.pts = cur_dts; -//if (st->codecpar->codec_type != AVMEDIA_TYPE_AUDIO) -pktl->pkt.duration = duration; +pktl->pkt.duration = duration; } else break; cur_dts = pktl->pkt.dts + pktl->pkt.duration; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".