Compare commits

...

4 Commits

Author SHA1 Message Date
James Almer
fe72a8781b avformat/iamf_parse: ensure the stream count in a scalable channel representation is equal to the audio element's stream count
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit faa382e5b1)
2025-11-27 21:58:55 -03:00
James Almer
b5996929df avformat/iamf_parse: ensure each layout in an scalable channel representation has an increasing number of channels
Fixes issue #21013

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 554ae5ada9)
2025-11-27 21:58:42 -03:00
James Almer
371d717601 avfilter/vf_scale: don't attempt to rescale AV_NOPTS_VALUE
Finishes fixing issue #20589.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit b9cc8e3210)
2025-11-27 21:57:42 -03:00
James Almer
1447aac2eb avfilter/framesync: don't attempt to rescale AV_NOPTS_VALUE
Part of a fix for issue #20589.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 5614672d1b)
2025-11-27 21:57:42 -03:00
3 changed files with 8 additions and 2 deletions

View File

@@ -248,7 +248,7 @@ static void framesync_inject_frame(FFFrameSync *fs, unsigned in, AVFrame *frame)
av_assert0(!fs->in[in].have_next);
av_assert0(frame);
pts = av_rescale_q(frame->pts, fs->in[in].time_base, fs->time_base);
pts = av_rescale_q_rnd(frame->pts, fs->in[in].time_base, fs->time_base, AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
frame->pts = pts;
fs->in[in].frame_next = frame;
fs->in[in].pts_next = pts;

View File

@@ -944,7 +944,7 @@ static int do_scale(FFFrameSync *fs)
goto err;
av_assert0(out);
out->pts = av_rescale_q(fs->pts, fs->time_base, outlink->time_base);
out->pts = av_rescale_q_rnd(fs->pts, fs->time_base, outlink->time_base, AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX);
return ff_filter_frame(outlink, out);
err:

View File

@@ -406,6 +406,9 @@ static int scalable_channel_layout_config(void *s, AVIOContext *pb,
.nb_channels = substream_count +
coupled_substream_count };
if (i && ch_layout.nb_channels <= audio_element->element->layers[i-1]->ch_layout.nb_channels)
return AVERROR_INVALIDDATA;
for (int j = 0; j < substream_count; j++) {
IAMFSubStream *substream = &audio_element->substreams[k++];
@@ -477,6 +480,9 @@ static int scalable_channel_layout_config(void *s, AVIOContext *pb,
av_channel_layout_copy(&layer->ch_layout, &ch_layout);
}
if (k != audio_element->nb_substreams)
return AVERROR_INVALIDDATA;
return 0;
}