[FFmpeg-devel] [PATCH] flvenc: flush after write header

Steven Liu lq at chinaffmpeg.org
Thu Oct 28 15:50:05 EEST 2021



> 2021年10月28日 下午2:32,Lingjiang Fang <vacingfang at foxmail.com> 写道:
> 
> keep align with movenc, or it seems a little weired when debug
> ---
> libavformat/flvenc.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
> index 3f24c7e192..f4798dc9a6 100644
> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -767,6 +767,8 @@ static int flv_write_header(AVFormatContext *s)
>         flv_write_codec_header(s, s->streams[i]->codecpar, 0);
>     }
> 
> +    avio_flush(pb);
> +
>     flv->datastart_offset = avio_tell(pb);
>     return 0;
> }
> -- 
> 2.29.2
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 

LGTM

Thanks

Steven Liu



More information about the ffmpeg-devel mailing list