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

Submitted by Michael Niedermayer on May 13, 2018, 10:41 a.m.

Details

Message ID 20180513104103.31080-1-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer May 13, 2018, 10:41 a.m.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/flvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Converse May 30, 2018, 5:32 a.m.
On Sun, May 13, 2018 at 3:41 AM, Michael Niedermayer
<michael@niedermayer.cc> wrote:
> Signed-off-by: Michael Niedermayer <michael@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.

Patch hide | download patch | download mbox

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;