Re: [FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo

2021-03-16 Thread Moritz Barsnick
On Tue, Mar 16, 2021 at 18:30:19 +1000, Zane van Iperen wrote: Nit: > Subject: avformat/pp_bnk: treat music files are stereo ^ as Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo

2021-03-16 Thread Andreas Rheinhardt
Zane van Iperen: > > > On 16/3/21 6:40 pm, Andreas Rheinhardt wrote: > >>> + >>> +    if (ctx->is_music) { >>> +    if (pkt->stream_index == 0) { >>> +    ctx->current_track--; >> >> I have to admit to be confused by this. Won't this imply that >> ctx->current_track will

Re: [FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo

2021-03-16 Thread Zane van Iperen
On 16/3/21 6:47 pm, Zane van Iperen wrote: On 16/3/21 6:40 pm, Andreas Rheinhardt wrote: + +    if (ctx->is_music) { +    if (pkt->stream_index == 0) { +    ctx->current_track--; I have to admit to be confused by this. Won't this imply that ctx->current_track will

Re: [FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo

2021-03-16 Thread Zane van Iperen
On 16/3/21 6:40 pm, Andreas Rheinhardt wrote: + +if (ctx->is_music) { +if (pkt->stream_index == 0) { +ctx->current_track--; I have to admit to be confused by this. Won't this imply that ctx->current_track will always be zero for music files until you hit

Re: [FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo

2021-03-16 Thread Andreas Rheinhardt
Zane van Iperen: > These files are technically a series of planar mono tracks. > If the "music" flag is set, merge the packets from the two > mono tracks, essentially replicating: > > [0:a:0][0:a:1]join=inputs=2:channel_layout=stereo[a] > > Signed-off-by: Zane van Iperen > --- >

[FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo

2021-03-16 Thread Zane van Iperen
These files are technically a series of planar mono tracks. If the "music" flag is set, merge the packets from the two mono tracks, essentially replicating: [0:a:0][0:a:1]join=inputs=2:channel_layout=stereo[a] Signed-off-by: Zane van Iperen --- libavformat/pp_bnk.c | 51