[FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Tue Mar 16 10:52:58 EET 2021
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 the
>> bytes_read == data_size check and that you just overwrite and therefore
>> leak the already allocated packets?
>>
>
> No, because it's a continue instead of a return, I need to counteract the
> "ctx->current_track++" in the above for(;;).
I didn't think about that; I only saw pkt->stream_index =
ctx->current_track++;.
- Andreas
More information about the ffmpeg-devel
mailing list