<div dir="ltr">  Hi,<div><br></div><div>  I have a piece of code decoding audio that broke when upgrading from ffmpeg 3 to 4. After tracing the code, the problem seems to be that the sample format of some audio streams is incorrectly notified both in AVCodecParameters and in AVCodecContext.</div><div><br></div><div>  With ffmpeg up to 3.2, the audio stream reports s16p sample format (can be seen in ffprobe output), and everything works fine.</div><div><br></div><div>      Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, mono, s16p, 192 kb/s</div><div><br></div><div>  Since ffmpeg 4.0 the audio stream reports fltp sample format, but the decoder still delivers s16p samples, so it outputs noise.</div><div><br></div><div>      Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, mono, fltp, 192 kb/s</div><div><br></div><div>  Has anyone else experienced this issue? Maybe a ffmpeg bug? Or am I the problem?</div><div><br></div><div>  The problem can be seen in this MPEG-TS transport: <a href="https://we.tl/NDhVZkGUj2">https://we.tl/NDhVZkGUj2</a></div><div><br></div><div>  Update: Luckily I have found that decoded AVFrames report the right sample format in ffmpeg 4.0, so I could implement a workaround, but it would be nice to know the right sample format after opening the stream, before decoding, as it was in previous ffmpeg versions.</div><div><br clear="all"><div><br></div><div>  Regards,</div><div><br></div>-- <br><div class="gmail_signature">Javier Taibo<br><br></div>
</div></div>