Skip to content

Commit

Permalink
avformat/flvenc: remove !size check for audio packets
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed May 17, 2024
1 parent 45ca1a5 commit 92290ce
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions libavformat/flvenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,11 +1067,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 ||
Expand Down Expand Up @@ -1146,8 +1141,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:
Expand Down

0 comments on commit 92290ce

Please sign in to comment.