[FFmpeg-cvslog] avfilter/vf_v360: remove intermediate variables

2019-09-22 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Sep 22 11:29:03 
2019 +0200| [79d14a3cc8e9105385044dbe2c4f696f0c9c1c07] | committer: Paul B Mahol

avfilter/vf_v360: remove intermediate variables

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79d14a3cc8e9105385044dbe2c4f696f0c9c1c07
---

 libavfilter/vf_v360.c | 14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 8339998454..fa28f31ae0 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -1414,11 +1414,8 @@ static int prepare_stereographic_out(AVFilterContext 
*ctx)
 {
 V360Context *s = ctx->priv;
 
-const float h_angle = tanf(FFMIN(s->h_fov, 359.f) * M_PI / 720.f);
-const float v_angle = tanf(FFMIN(s->v_fov, 359.f) * M_PI / 720.f);
-
-s->flat_range[0] = h_angle;
-s->flat_range[1] = v_angle;
+s->flat_range[0] = tanf(FFMIN(s->h_fov, 359.f) * M_PI / 720.f);
+s->flat_range[1] = tanf(FFMIN(s->v_fov, 359.f) * M_PI / 720.f);
 
 return 0;
 }
@@ -1990,11 +1987,8 @@ static int prepare_flat_out(AVFilterContext *ctx)
 {
 V360Context *s = ctx->priv;
 
-const float h_angle = 0.5f * s->h_fov * M_PI / 180.f;
-const float v_angle = 0.5f * s->v_fov * M_PI / 180.f;
-
-s->flat_range[0] = tanf(h_angle);
-s->flat_range[1] = tanf(v_angle);
+s->flat_range[0] = tanf(0.5f * s->h_fov * M_PI / 180.f);
+s->flat_range[1] = tanf(0.5f * s->v_fov * M_PI / 180.f);
 
 return 0;
 }

___
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] avfilter/vf_v360: add fixed pixel padding options

2019-09-22 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Sep 22 14:01:14 
2019 +0200| [51a2f02117df54a78a3ccde65ff6b09d10503843] | committer: Paul B Mahol

avfilter/vf_v360: add fixed pixel padding options

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51a2f02117df54a78a3ccde65ff6b09d10503843
---

 doc/filters.texi  |  6 
 libavfilter/v360.h|  4 +++
 libavfilter/vf_v360.c | 83 +++
 3 files changed, 67 insertions(+), 26 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 2cc0d9dfc5..e41384aed8 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -17961,6 +17961,12 @@ No padding.
 
 Default value is @b{@samp{0}}.
 
+@item fin_pad
+@item fout_pad
+Set fixed padding for the input/output cubemap. Values in pixels.
+
+Default value is @b{@samp{0}}. If greater than zero it overrides other padding 
options.
+
 @item in_forder
 @item out_forder
 Set order of faces for the input/output cubemap. Choose one direction for each 
position.
diff --git a/libavfilter/v360.h b/libavfilter/v360.h
index aa0bb948d5..031c1924f1 100644
--- a/libavfilter/v360.h
+++ b/libavfilter/v360.h
@@ -114,6 +114,7 @@ typedef struct V360Context {
 int in_stereo, out_stereo;
 
 float in_pad, out_pad;
+int fin_pad, fout_pad;
 
 float yaw, pitch, roll;
 
@@ -129,6 +130,9 @@ typedef struct V360Context {
 float input_mirror_modifier[2];
 float output_mirror_modifier[3];
 
+int in_width, in_height;
+int out_width, out_height;
+
 int pr_width[4], pr_height[4];
 
 int in_offset_w[4], in_offset_h[4];
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index fa28f31ae0..c34e3258f5 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -105,8 +105,10 @@ static const AVOption v360_options[] = {
 {"out_forder", "output cubemap face order", OFFSET(out_forder), 
AV_OPT_TYPE_STRING, {.str="rludfb"},0, NB_DIRECTIONS-1, FLAGS, 
"out_forder"},
 {   "in_frot", "input cubemap face rotation",  OFFSET(in_frot), 
AV_OPT_TYPE_STRING, {.str="00"},0, NB_DIRECTIONS-1, FLAGS, 
"in_frot"},
 {  "out_frot", "output cubemap face rotation",OFFSET(out_frot), 
AV_OPT_TYPE_STRING, {.str="00"},0, NB_DIRECTIONS-1, FLAGS, 
"out_frot"},
-{"in_pad", "input cubemap pads",OFFSET(in_pad), 
AV_OPT_TYPE_FLOAT,  {.dbl=0.f},   0.f, 1.f, FLAGS, 
"in_pad"},
-{   "out_pad", "output cubemap pads",  OFFSET(out_pad), 
AV_OPT_TYPE_FLOAT,  {.dbl=0.f},   0.f, 1.f, FLAGS, 
"out_pad"},
+{"in_pad", "percent input cubemap pads",OFFSET(in_pad), 
AV_OPT_TYPE_FLOAT,  {.dbl=0.f},   0.f, 1.f, FLAGS, 
"in_pad"},
+{   "out_pad", "percent output cubemap pads",  OFFSET(out_pad), 
AV_OPT_TYPE_FLOAT,  {.dbl=0.f},   0.f, 1.f, FLAGS, 
"out_pad"},
+{   "fin_pad", "fixed input cubemap pads", OFFSET(fin_pad), 
AV_OPT_TYPE_INT,{.i64=0},   0, 100, FLAGS, 
"fin_pad"},
+{  "fout_pad", "fixed output cubemap pads",   OFFSET(fout_pad), 
AV_OPT_TYPE_INT,{.i64=0},   0, 100, FLAGS, 
"fout_pad"},
 {   "yaw", "yaw rotation", OFFSET(yaw), 
AV_OPT_TYPE_FLOAT,  {.dbl=0.f},-180.f,   180.f, FLAGS, 
"yaw"},
 { "pitch", "pitch rotation", OFFSET(pitch), 
AV_OPT_TYPE_FLOAT,  {.dbl=0.f},-180.f,   180.f, FLAGS, 
"pitch"},
 {  "roll", "roll rotation",   OFFSET(roll), 
AV_OPT_TYPE_FLOAT,  {.dbl=0.f},-180.f,   180.f, FLAGS, 
"roll"},
@@ -724,16 +726,18 @@ static void normalize_vector(float *vec)
  * @param vf vertical cubemap coordinate [0, 1)
  * @param face face of cubemap
  * @param vec coordinates on sphere
+ * @param scalew scale for uf
+ * @param scaleh scale for vf
  */
 static void cube_to_xyz(const V360Context *s,
 float uf, float vf, int face,
-float *vec)
+float *vec, float scalew, float scaleh)
 {
 const int direction = s->out_cubemap_direction_order[face];
 float l_x, l_y, l_z;
 
-uf /= (1.f - s->out_pad);
-vf /= (1.f - s->out_pad);
+uf /= scalew;
+vf /= scaleh;
 
 rotate_cube_face_inverse(&uf, &vf, s->out_cubemap_face_rotation[face]);
 
@@ -1063,6 +1067,9 @@ static void cube3x2_to_xyz(const V360Context *s,
int i, int j, int width, int height,
float *vec)
 {
+const float scalew = s->fout_pad > 0 ? 1.f - s->fout_pad / (s->out_width  
/ 3.f) : 1.f - s->out_pad;
+const float scaleh = s->fout_pad > 0 ? 1.f - s->fout_pad / (s->out_height 
/ 2.f) : 1.f - s->out_pad;
+
 const float ew = width  / 3.f;
 const float eh = height / 2.f;
 
@@ -1078,7 +1085,7 @@ static void cube3x2_to_xyz(const V360Context *s,
 const float uf = 2.f

[FFmpeg-cvslog] avutil/opt: Fix type specifier

2019-09-22 Thread Andreas Rheinhardt
ffmpeg | branch: master | Andreas Rheinhardt  | 
Sat Sep 21 11:15:42 2019 +0200| [25a501b5287b5e84121302c41109b0cfdd7785b2] | 
committer: Michael Niedermayer

avutil/opt: Fix type specifier

This bug has been introduced in 9e0a071e.

Signed-off-by: Andreas Rheinhardt 
Reviewed-by: Paul B Mahol 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=25a501b5287b5e84121302c41109b0cfdd7785b2
---

 libavutil/opt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 35dc9e153d..7c2649725f 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1200,7 +1200,7 @@ static void opt_list(void *obj, void *av_log_obj, const 
char *unit,
 break;
 case AV_OPT_TYPE_CONST:
 if (parent_type == AV_OPT_TYPE_INT)
-av_log(av_log_obj, AV_LOG_INFO, "%-12d ", 
opt->default_val.i64);
+av_log(av_log_obj, AV_LOG_INFO, "%-12"PRId64" ", 
opt->default_val.i64);
 else
 av_log(av_log_obj, AV_LOG_INFO, "%-12s ", "");
 break;

___
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] avcodec/sunrast: Fix indention

2019-09-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Sep 21 18:06:24 2019 +0200| [0728d644973c314785c26b3d0559ba829ca31641] | 
committer: Michael Niedermayer

avcodec/sunrast: Fix indention

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0728d644973c314785c26b3d0559ba829ca31641
---

 libavcodec/sunrast.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index 883421202a..baf184968f 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -132,8 +132,8 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void 
*data,
 return AVERROR(ENOMEM);
 stride = (w + 15 >> 3) * depth;
 } else {
-ptr= p->data[0];
-stride = p->linesize[0];
+ptr= p->data[0];
+stride = p->linesize[0];
 }
 
 /* scanlines are aligned on 16 bit boundaries */

___
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] avcodec/sunrast: Fix return type for "unsupported (compression) type"

2019-09-22 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Sep 21 18:06:02 2019 +0200| [0e8b7709a92afd7c10b4b5861870f6e365f280c3] | 
committer: Michael Niedermayer

avcodec/sunrast: Fix return type for "unsupported (compression) type"

Reviewed-by: Paul B Mahol 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e8b7709a92afd7c10b4b5861870f6e365f280c3
---

 libavcodec/sunrast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index 0af5626e35..883421202a 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -72,7 +72,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void 
*data,
 
 if (type == RT_FORMAT_TIFF || type == RT_FORMAT_IFF) {
 av_log(avctx, AV_LOG_ERROR, "unsupported (compression) type\n");
-return -1;
+return AVERROR_PATCHWELCOME;
 }
 
 switch (depth) {

___
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] avformat/y4m: do not try to seek if pts is less than 0

2019-09-22 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Sep 22 19:24:17 
2019 +0200| [05a2ce93265442285b2838530ba5bb5702cd18b1] | committer: Paul B Mahol

avformat/y4m: do not try to seek if pts is less than 0

Fixes #8193.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05a2ce93265442285b2838530ba5bb5702cd18b1
---

 libavformat/yuv4mpegdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c
index fc2f0ca054..eceb945bb1 100644
--- a/libavformat/yuv4mpegdec.c
+++ b/libavformat/yuv4mpegdec.c
@@ -326,6 +326,8 @@ static int yuv4_read_seek(AVFormatContext *s, int 
stream_index,
 
 if (flags & AVSEEK_FLAG_BACKWARD)
 pts = FFMAX(0, pts - 1);
+if (pts < 0)
+return -1;
 pos = pts * s->packet_size;
 
 if (avio_seek(s->pb, pos + s->internal->data_offset, SEEK_SET) < 0)

___
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] avfilter/v360: reduce size of some struct members

2019-09-22 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Sep 22 19:55:31 
2019 +0200| [b4d2bea64722cc0a9916a6265891f115551ad3e6] | committer: Paul B Mahol

avfilter/v360: reduce size of some struct members

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4d2bea64722cc0a9916a6265891f115551ad3e6
---

 libavfilter/v360.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/v360.h b/libavfilter/v360.h
index 031c1924f1..d328b6d5e1 100644
--- a/libavfilter/v360.h
+++ b/libavfilter/v360.h
@@ -145,8 +145,8 @@ typedef struct V360Context {
 int nb_allocated;
 int elements;
 
-uint16_t *u[4], *v[4];
-int16_t *ker[4];
+uint16_t *u[2], *v[2];
+int16_t *ker[2];
 unsigned map[4];
 
 void (*in_transform)(const struct V360Context *s,

___
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] avfilter/vf_v360: fix mercator_to_xyz()

2019-09-22 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Sep 22 20:52:40 
2019 +0200| [a8925d264a95c63c59faa94f697f51cb4dff09b4] | committer: Paul B Mahol

avfilter/vf_v360: fix mercator_to_xyz()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a8925d264a95c63c59faa94f697f51cb4dff09b4
---

 libavfilter/vf_v360.c | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index c34e3258f5..3b3ca16578 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -1589,17 +1589,18 @@ static void mercator_to_xyz(const V360Context *s,
 int i, int j, int width, int height,
 float *vec)
 {
-const float phi   = ((2.f * i) / width  - 1.f) * M_PI;
-const float theta = atanf(sinhf(((2.f * j) / height - 1.f) * 2.f * M_PI));
+const float phi = ((2.f * i) / width - 1.f) * M_PI + M_PI_2;
+const float y   = ((2.f * j) / height - 1.f) * M_PI;
+const float div = expf(2.f * y) + 1.f;
 
 const float sin_phi   = sinf(phi);
 const float cos_phi   = cosf(phi);
-const float sin_theta = sinf(theta);
-const float cos_theta = cosf(theta);
+const float sin_theta = -2.f * expf(y) / div;
+const float cos_theta = -(expf(2.f * y) - 1.f) / div;
 
-vec[0] =  cos_theta * sin_phi;
-vec[1] = -sin_theta;
-vec[2] = -cos_theta * cos_phi;
+vec[0] = sin_theta * cos_phi;
+vec[1] = cos_theta;
+vec[2] = sin_theta * sin_phi;
 }
 
 /**

___
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] avfilter/vf_v360: adjust h for mercator input/output

2019-09-22 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Sep 22 22:34:13 
2019 +0200| [4ba45a95df1b3b38fe69e7e462d1c7c564ac395f] | committer: Paul B Mahol

avfilter/vf_v360: adjust h for mercator input/output

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ba45a95df1b3b38fe69e7e462d1c7c564ac395f
---

 libavfilter/vf_v360.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 3d855cb5b4..e44a26ee45 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -2598,7 +2598,7 @@ static int config_output(AVFilterLink *outlink)
 s->in_transform = xyz_to_mercator;
 err = 0;
 wf = w;
-hf = h;
+hf = h / 2.f;
 break;
 case BALL:
 s->in_transform = xyz_to_ball;
@@ -2680,7 +2680,7 @@ static int config_output(AVFilterLink *outlink)
 s->out_transform = mercator_to_xyz;
 prepare_out = NULL;
 w = roundf(wf);
-h = roundf(hf);
+h = roundf(hf * 2.f);
 break;
 case BALL:
 s->out_transform = ball_to_xyz;

___
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] avfilter/vf_v360: fix xyz_to_mercator()

2019-09-22 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Sep 22 22:31:07 
2019 +0200| [043038ea56ab9349d85cbf8da27a6944e5f75100] | committer: Paul B Mahol

avfilter/vf_v360: fix xyz_to_mercator()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=043038ea56ab9349d85cbf8da27a6944e5f75100
---

 libavfilter/vf_v360.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 3b3ca16578..3d855cb5b4 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -1555,12 +1555,12 @@ static void xyz_to_mercator(const V360Context *s,
 uint16_t us[4][4], uint16_t vs[4][4], float *du, 
float *dv)
 {
 const float phi   = atan2f(vec[0], -vec[2]) * s->input_mirror_modifier[0];
-const float theta = 0.5f * asinhf(vec[1] / sqrtf(1.f - vec[1] * vec[1])) * 
s->input_mirror_modifier[1];
+const float theta = -vec[1] * s->input_mirror_modifier[1];
 float uf, vf;
 int ui, vi;
 
-uf = (phi   / M_PI + 1.f) * width  / 2.f;
-vf = (theta / M_PI + 1.f) * height / 2.f;
+uf = (phi / M_PI + 1.f) * width / 2.f;
+vf = (av_clipf(logf((1.f + theta) / (1.f - theta)) / (2.f * M_PI), -1.f, 
1.f) + 1.f) * height / 2.f;
 ui = floorf(uf);
 vi = floorf(vf);
 
@@ -1569,7 +1569,7 @@ static void xyz_to_mercator(const V360Context *s,
 
 for (int i = -1; i < 3; i++) {
 for (int j = -1; j < 3; j++) {
-us[i + 1][j + 1] = mod(ui + j, width);
+us[i + 1][j + 1] = av_clip(ui + j, 0, width  - 1);
 vs[i + 1][j + 1] = av_clip(vi + i, 0, height - 1);
 }
 }

___
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] avformat/dashdec: fix segfault when parsing segmentlist

2019-09-22 Thread vectronic
ffmpeg | branch: master | vectronic  | Mon Sep 16 
11:44:28 2019 +0100| [8c90bb8ebb6e60d1e6f48259091c0f3f7ff57b3e] | committer: 
Steven Liu

avformat/dashdec: fix segfault when parsing segmentlist

index into segmentlists_tab was specified as 4 instead of 3 causing invalid 
access

further fix to: 8135

Reviewed-by: Steven Liu 
Signed-off-by: vectronic 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8c90bb8ebb6e60d1e6f48259091c0f3f7ff57b3e
---

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 738bfeaefb..7713ee8907 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);

___
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] avformat/dashdec: fix pointer being freed was not allocated

2019-09-22 Thread vectronic
ffmpeg | branch: master | vectronic  | Mon Sep 16 
11:44:27 2019 +0100| [598962cd3a68e30662cfbd5e053eef85d2ee3a8a] | committer: 
Steven Liu

avformat/dashdec: fix pointer being freed was not allocated

prevent attempt to call xmlFree if val was not allocated
fixes: 8135

Reviewed-by: Steven Liu 
Signed-off-by: vectronic 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=598962cd3a68e30662cfbd5e053eef85d2ee3a8a
---

 libavformat/dashdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 8c0a9b0102..738bfeaefb 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1203,6 +1203,7 @@ static int parse_programinformation(AVFormatContext *s, 
xmlNodePtr node)
 }
 node = xmlNextElementSibling(node);
 xmlFree(val);
+val = NULL;
 }
 return 0;
 }

___
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".