You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/flvenc: remove !size check for audio packets
At least flac finishes every stream with an empty side-data only packet, that would trigger an assertion/error were these checks still in place.
This commit is contained in:
@@ -1070,11 +1070,6 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
|| par->codec_id == AV_CODEC_ID_AC3
|
|| par->codec_id == AV_CODEC_ID_AC3
|
||||||
|| par->codec_id == AV_CODEC_ID_EAC3;
|
|| 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)
|
if (extended_audio)
|
||||||
flags_size = 5;
|
flags_size = 5;
|
||||||
else if (par->codec_id == AV_CODEC_ID_VP6F || par->codec_id == AV_CODEC_ID_VP6A ||
|
else if (par->codec_id == AV_CODEC_ID_VP6F || par->codec_id == AV_CODEC_ID_VP6A ||
|
||||||
@@ -1149,8 +1144,6 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
flags = get_audio_flags(s, par);
|
flags = get_audio_flags(s, par);
|
||||||
|
|
||||||
av_assert0(size);
|
|
||||||
|
|
||||||
avio_w8(pb, FLV_TAG_TYPE_AUDIO);
|
avio_w8(pb, FLV_TAG_TYPE_AUDIO);
|
||||||
break;
|
break;
|
||||||
case AVMEDIA_TYPE_SUBTITLE:
|
case AVMEDIA_TYPE_SUBTITLE:
|
||||||
|
Reference in New Issue
Block a user