When muxing to FLV/RTMP a MP3 track with an ID greater than zero, enhanced RTMP has to be used, and a sequence start should preceed track data. This is already implemented (see line 823 of flvenc.c) but the code is never reached due to a too-strict condition before it. This patch fixes the issue.
Unified · Split
| @@ -807,6 +807,7 @@ static void flv_write_codec_header(AVFormatContext* s, AVCodecParameters* par, i · 806 unmodified lines | ||
| 807 | 807 | if (par->codec_id == AV_CODEC_ID_AAC || par->codec_id == AV_CODEC_ID_H264 |
| 808 | 808 | || par->codec_id == AV_CODEC_ID_MPEG4 || par->codec_id == AV_CODEC_ID_HEVC |
| 809 | 809 | || par->codec_id == AV_CODEC_ID_AV1 || par->codec_id == AV_CODEC_ID_VP9 |
| 810 | + || (par->codec_id == AV_CODEC_ID_MP3 && track_idx) | |
| 810 | 811 | || par->codec_id == AV_CODEC_ID_OPUS || par->codec_id == AV_CODEC_ID_FLAC |
| 811 | 812 | || par->codec_id == AV_CODEC_ID_AC3 || par->codec_id == AV_CODEC_ID_EAC3) { |
| 812 | 813 | int64_t pos; |