lavf/mpegtsenc: Only fail aac muxing if the first frame is invalid.
Fixes ticket #3957.
This commit is contained in:
parent
d44cf5ef42
commit
1d5edad8cc
@ -1313,9 +1313,9 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (!ts_st->amux) {
|
if (!ts_st->amux) {
|
||||||
av_log(s, AV_LOG_ERROR, "AAC bitstream not in ADTS format "
|
av_log(s, AV_LOG_ERROR, "AAC bitstream not in ADTS format "
|
||||||
"and extradata missing\n");
|
"and extradata missing\n");
|
||||||
|
if (!st->nb_frames)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
av_init_packet(&pkt2);
|
av_init_packet(&pkt2);
|
||||||
pkt2.data = pkt->data;
|
pkt2.data = pkt->data;
|
||||||
pkt2.size = pkt->size;
|
pkt2.size = pkt->size;
|
||||||
@ -1335,6 +1335,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
|
|||||||
ts_st->amux->pb = NULL;
|
ts_st->amux->pb = NULL;
|
||||||
buf = data;
|
buf = data;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (st->codec->codec_id == AV_CODEC_ID_HEVC) {
|
} else if (st->codec->codec_id == AV_CODEC_ID_HEVC) {
|
||||||
int ret = check_hevc_startcode(s, st, pkt);
|
int ret = check_hevc_startcode(s, st, pkt);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user