[FFmpeg-devel] [PATCH 04/14] avformat/flvenc: remove !size check for audio packets
Timo Rothenpieler
timo at rothenpieler.org
Thu Dec 12 21:55:29 EET 2024
---
libavformat/flvenc.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index b85edc322f..21e2bca5be 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -1068,11 +1068,6 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|| par->codec_id == AV_CODEC_ID_AC3
|| par->codec_id == AV_CODEC_ID_EAC3;
- if (par->codec_type == AVMEDIA_TYPE_AUDIO && !pkt->size) {
- av_log(s, AV_LOG_WARNING, "Empty audio Packet\n");
- return AVERROR(EINVAL);
- }
-
if (extended_audio)
flags_size = 5;
else if (par->codec_id == AV_CODEC_ID_VP6F || par->codec_id == AV_CODEC_ID_VP6A ||
@@ -1147,8 +1142,6 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
case AVMEDIA_TYPE_AUDIO:
flags = get_audio_flags(s, par);
- av_assert0(size);
-
avio_w8(pb, FLV_TAG_TYPE_AUDIO);
break;
case AVMEDIA_TYPE_SUBTITLE:
--
2.45.2
More information about the ffmpeg-devel
mailing list