Message ID | AS1PR01MB9564DCEB186BAB33164346278F129@AS1PR01MB9564.eurprd01.prod.exchangelabs.com |
---|---|
State | Accepted |
Commit | 814f806e0630e5338ad0d04e24777daceafa862b |
Headers | show |
Series | [FFmpeg-devel] avformat/imfdec: Convert to the new channel layout API | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_aarch64_jetson | success | Make finished |
andriy/make_fate_aarch64_jetson | success | Make fate finished |
On 3/17/2022 10:09 AM, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavformat/imfdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c > index 3ce850b75a..9ec52efbc8 100644 > --- a/libavformat/imfdec.c > +++ b/libavformat/imfdec.c > @@ -874,7 +874,7 @@ static int imf_read_packet(AVFormatContext *s, AVPacket *pkt) > int64_t nbsamples = av_rescale_q(pkt->duration, > st->time_base, > av_make_q(1, st->codecpar->sample_rate)); > - av_shrink_packet(pkt, nbsamples * st->codecpar->channels * bytes_per_sample); > + av_shrink_packet(pkt, nbsamples * st->codecpar->ch_layout.nb_channels * bytes_per_sample); Guess i missed it because i didn't have libxml2 enabled. LGTM, thanks. > > } else { > /* in all other cases, use side data to skip samples */
James Almer: > > > On 3/17/2022 10:09 AM, Andreas Rheinhardt wrote: >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> >> --- >> libavformat/imfdec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c >> index 3ce850b75a..9ec52efbc8 100644 >> --- a/libavformat/imfdec.c >> +++ b/libavformat/imfdec.c >> @@ -874,7 +874,7 @@ static int imf_read_packet(AVFormatContext *s, >> AVPacket *pkt) >> int64_t nbsamples = av_rescale_q(pkt->duration, >> st->time_base, >> av_make_q(1, >> st->codecpar->sample_rate)); >> - av_shrink_packet(pkt, nbsamples * >> st->codecpar->channels * bytes_per_sample); >> + av_shrink_packet(pkt, nbsamples * >> st->codecpar->ch_layout.nb_channels * bytes_per_sample); > > Guess i missed it because i didn't have libxml2 enabled. > > LGTM, thanks. > This and the fact that this code is quite recent: It has been merged in b0193e26ca32914bdd3d05be5d1f474ca8c52124 on Feb 20. - Andreas
diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c index 3ce850b75a..9ec52efbc8 100644 --- a/libavformat/imfdec.c +++ b/libavformat/imfdec.c @@ -874,7 +874,7 @@ static int imf_read_packet(AVFormatContext *s, AVPacket *pkt) int64_t nbsamples = av_rescale_q(pkt->duration, st->time_base, av_make_q(1, st->codecpar->sample_rate)); - av_shrink_packet(pkt, nbsamples * st->codecpar->channels * bytes_per_sample); + av_shrink_packet(pkt, nbsamples * st->codecpar->ch_layout.nb_channels * bytes_per_sample); } else { /* in all other cases, use side data to skip samples */
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavformat/imfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)