typedef enum {
FLV_AAC_SEQ_HEADER_DETECT = (1 << 0),
+ FLV_NO_SEQUENCE_END = (1 << 1),
} FLVFlags;
typedef struct FLVContext {
FLVContext *flv = s->priv_data;
int i;
- /* Add EOS tag */
- for (i = 0; i < s->nb_streams; i++) {
- AVCodecParameters *par = s->streams[i]->codecpar;
- FLVStreamContext *sc = s->streams[i]->priv_data;
- if (par->codec_type == AVMEDIA_TYPE_VIDEO &&
- (par->codec_id == AV_CODEC_ID_H264 || par->codec_id == AV_CODEC_ID_MPEG4))
- put_avc_eos_tag(pb, sc->last_ts);
+ if (flv->flags & FLV_NO_SEQUENCE_END) {
+ av_log(s, AV_LOG_DEBUG, "FLV no sequence end mode open\n");
+ } else {
+ /* Add EOS tag */
+ for (i = 0; i < s->nb_streams; i++) {
+ AVCodecParameters *par = s->streams[i]->codecpar;
+ FLVStreamContext *sc = s->streams[i]->priv_data;
+ if (par->codec_type == AVMEDIA_TYPE_VIDEO &&
+ (par->codec_id == AV_CODEC_ID_H264 || par->codec_id == AV_CODEC_ID_MPEG4))
+ put_avc_eos_tag(pb, sc->last_ts);
+ }
}
file_size = avio_tell(pb);
static const AVOption options[] = {
{ "flvflags", "FLV muxer flags", offsetof(FLVContext, flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "flvflags" },
{ "aac_seq_header_detect", "Put AAC sequence header based on stream data", 0, AV_OPT_TYPE_CONST, {.i64 = FLV_AAC_SEQ_HEADER_DETECT}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "flvflags" },
+ { "no_sequence_end", "disable sequence end for FLV", 0, AV_OPT_TYPE_CONST, {.i64 = FLV_NO_SEQUENCE_END}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "flvflags" },
{ NULL },
};