The warning silenced was: libavfilter/af_join.c: In function ‘join_request_frame’: libavfilter/af_join.c:451:9: warning: ‘nb_samples’ may be used uninitialized in this function [-Wuninitialized]
Unified · Split
| @@ -419,7 +419,7 @@ static int join_request_frame(AVFilterLink *outlink) · 418 unmodified lines | |||
| 419 | JoinBufferPriv *priv; | 419 | JoinBufferPriv *priv; |
| 420 | int linesize = INT_MAX; | 420 | int linesize = INT_MAX; |
| 421 | int perms = ~0; | 421 | int perms = ~0; |
| 422 | int nb_samples; | 422 | int nb_samples = 0; |
| 423 | int i, j, ret; | 423 | int i, j, ret; |
| 424 | 424 | ||
| 425 | /* get a frame on each input */ | 425 | /* get a frame on each input */ |
| @@ -448,6 +448,7 @@ static int join_request_frame(AVFilterLink *outlink) · 22 unmodified lines | |||
| 448 | perms &= cur_buf->perms; | 448 | perms &= cur_buf->perms; |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | av_assert0(nb_samples > 0); | ||
| 451 | buf = avfilter_get_audio_buffer_ref_from_arrays(s->data, linesize, perms, | 452 | buf = avfilter_get_audio_buffer_ref_from_arrays(s->data, linesize, perms, |
| 452 | nb_samples, outlink->format, | 453 | nb_samples, outlink->format, |
| 453 | outlink->channel_layout); | 454 | outlink->channel_layout); |