[FFmpeg-devel] [PATCH] avformat/flvenc: Avoid truncating timestamp before avio_write_marker()

Alex Converse alex.converse at gmail.com
Wed May 30 08:32:50 EEST 2018


On Sun, May 13, 2018 at 3:41 AM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavformat/flvenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
> index e8af48cb64..168ff9ffb8 100644
> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -873,7 +873,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
>      AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar;
>      FLVContext *flv      = s->priv_data;
>      FLVStreamContext *sc = s->streams[pkt->stream_index]->priv_data;
> -    unsigned ts;
> +    int64_t ts;
>      int size = pkt->size;
>      uint8_t *data = NULL;
>      int flags = -1, flags_size, ret;
> --
> 2.17.0

The put_avc_eos_tag() function signature applies a similar truncation.
Best to be consistent.


More information about the ffmpeg-devel mailing list