[FFmpeg-devel] [PATCH v2] avformat/pp_bnk: treat music files are stereo
Zane van Iperen
zane at zanevaniperen.com
Tue Mar 16 10:50:24 EET 2021
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 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(;;).
Forgot to mention, it's also incremented immediately above:
pkt->stream_index = ctx->current_track++;
...Yeah, I might clean this up a bit.
More information about the ffmpeg-devel
mailing list