diff mbox

[FFmpeg-devel,v2] avfilter/asrc_anoisesrc: change color variable to int

Message ID 20191026132324.6625-1-lance.lmwang@gmail.com
State Accepted
Commit e1c4ce4761fc5cbc904bca8e802fdf65211a6a0a
Headers show

Commit Message

Lance Wang Oct. 26, 2019, 1:23 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Or it'll cause invalid color and s->filter is NULL.
Please reproduce it with below command on big endian system:
$ ./ffmpeg -f lavfi -i "anoisesrc=d=60:c=1:r=48000" -f s16le -c:a pcm_s16le  -f
null  -
Segmentation fault (core dumped)

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/asrc_anoisesrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Oct. 26, 2019, 1:34 p.m. UTC | #1
OK

On 10/26/19, lance.lmwang@gmail.com <lance.lmwang@gmail.com> wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
>
> Or it'll cause invalid color and s->filter is NULL.
> Please reproduce it with below command on big endian system:
> $ ./ffmpeg -f lavfi -i "anoisesrc=d=60:c=1:r=48000" -f s16le -c:a pcm_s16le
> -f
> null  -
> Segmentation fault (core dumped)
>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/asrc_anoisesrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/asrc_anoisesrc.c b/libavfilter/asrc_anoisesrc.c
> index 78f0af4..cedadde 100644
> --- a/libavfilter/asrc_anoisesrc.c
> +++ b/libavfilter/asrc_anoisesrc.c
> @@ -30,7 +30,7 @@ typedef struct ANoiseSrcContext {
>      int sample_rate;
>      double amplitude;
>      int64_t duration;
> -    int64_t color;
> +    int color;
>      int64_t seed;
>      int nb_samples;
>
> --
> 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-request@ffmpeg.org with subject "unsubscribe".
Michael Niedermayer Oct. 29, 2019, 1:35 p.m. UTC | #2
On Sat, Oct 26, 2019 at 03:34:04PM +0200, Paul B Mahol wrote:
> OK

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavfilter/asrc_anoisesrc.c b/libavfilter/asrc_anoisesrc.c
index 78f0af4..cedadde 100644
--- a/libavfilter/asrc_anoisesrc.c
+++ b/libavfilter/asrc_anoisesrc.c
@@ -30,7 +30,7 @@  typedef struct ANoiseSrcContext {
     int sample_rate;
     double amplitude;
     int64_t duration;
-    int64_t color;
+    int color;
     int64_t seed;
     int nb_samples;