diff mbox series

[FFmpeg-devel,1/2] avformat/matroskaenc: Remove remnant of inline-timing subtitle packets

Message ID HE1PR0301MB2154703213D64386C024B5398F749@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit 85709a90c3517e3429bb1206d26f7238dbd6a1bd
Headers show
Series [FFmpeg-devel,1/2] avformat/matroskaenc: Remove remnant of inline-timing subtitle packets
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt April 8, 2021, 11:20 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/matroskaenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Andreas Rheinhardt April 9, 2021, 10:01 p.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavformat/matroskaenc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 609a588f78..a4ddf1fa6a 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -2187,7 +2187,7 @@ static int mkv_write_vtt_blocks(AVFormatContext *s, AVIOContext *pb, const AVPac
>      put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, pkt->duration);
>      end_ebml_master(pb, blockgroup);
>  
> -    return pkt->duration;
> +    return 0;
>  }
>  
>  static int mkv_end_cluster(AVFormatContext *s)
> @@ -2358,9 +2358,9 @@ static int mkv_write_packet_internal(AVFormatContext *s, const AVPacket *pkt)
>          }
>      } else {
>          if (par->codec_id == AV_CODEC_ID_WEBVTT) {
> -            duration = mkv_write_vtt_blocks(s, pb, pkt);
> -            if (duration < 0)
> -                return duration;
> +            ret = mkv_write_vtt_blocks(s, pb, pkt);
> +            if (ret < 0)
> +                return ret;
>          } else {
>              ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP,
>                                                         mkv_blockgroup_size(pkt->size,
> 
Will apply this patchset tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 609a588f78..a4ddf1fa6a 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -2187,7 +2187,7 @@  static int mkv_write_vtt_blocks(AVFormatContext *s, AVIOContext *pb, const AVPac
     put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, pkt->duration);
     end_ebml_master(pb, blockgroup);
 
-    return pkt->duration;
+    return 0;
 }
 
 static int mkv_end_cluster(AVFormatContext *s)
@@ -2358,9 +2358,9 @@  static int mkv_write_packet_internal(AVFormatContext *s, const AVPacket *pkt)
         }
     } else {
         if (par->codec_id == AV_CODEC_ID_WEBVTT) {
-            duration = mkv_write_vtt_blocks(s, pb, pkt);
-            if (duration < 0)
-                return duration;
+            ret = mkv_write_vtt_blocks(s, pb, pkt);
+            if (ret < 0)
+                return ret;
         } else {
             ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP,
                                                        mkv_blockgroup_size(pkt->size,