diff mbox

[FFmpeg-devel,1/2] flvdec: Rename FLV_STREAM_TYPE_DATA into FLV_STREAM_TYPE_SUBTITLE

Message ID 20181025125917.31923-1-martin@martin.st
State Accepted
Commit e7ed9d81bff0e244fce1bb35e9fda2c255c1c2bb
Headers show

Commit Message

Martin Storsjö Oct. 25, 2018, 12:59 p.m. UTC
This is always treated as a subtitle at the moment anyway.
---
 libavformat/flv.h    | 2 +-
 libavformat/flvdec.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Michael Niedermayer Oct. 27, 2018, 6:05 p.m. UTC | #1
On Thu, Oct 25, 2018 at 03:59:16PM +0300, Martin Storsjö wrote:
> This is always treated as a subtitle at the moment anyway.
> ---
>  libavformat/flv.h    | 2 +-
>  libavformat/flvdec.c | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)

LGTM

thx

[...]
diff mbox

Patch

diff --git a/libavformat/flv.h b/libavformat/flv.h
index df5ce3d17f..3aabb3adc9 100644
--- a/libavformat/flv.h
+++ b/libavformat/flv.h
@@ -65,7 +65,7 @@  enum FlvTagType {
 enum {
     FLV_STREAM_TYPE_VIDEO,
     FLV_STREAM_TYPE_AUDIO,
-    FLV_STREAM_TYPE_DATA,
+    FLV_STREAM_TYPE_SUBTITLE,
     FLV_STREAM_TYPE_NB,
 };
 
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index a2dea464e3..ffc975f15d 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -996,7 +996,7 @@  retry:
             if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_VIDEO_INFO_CMD)
                 goto skip;
         } else if (type == FLV_TAG_TYPE_META) {
-            stream_type=FLV_STREAM_TYPE_DATA;
+            stream_type=FLV_STREAM_TYPE_SUBTITLE;
             if (size > 13 + 1 + 4) { // Header-type metadata stuff
                 int type;
                 meta_pos = avio_tell(s->pb);
@@ -1051,7 +1051,7 @@  skip:
                 if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
                     (s->video_codec_id || flv_same_video_codec(st->codecpar, flags)))
                     break;
-            } else if (stream_type == FLV_STREAM_TYPE_DATA) {
+            } else if (stream_type == FLV_STREAM_TYPE_SUBTITLE) {
                 if (st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE)
                     break;
             }
@@ -1151,7 +1151,7 @@  retry_duration:
         if (ret < 0)
             return ret;
         size -= ret;
-    } else if (stream_type == FLV_STREAM_TYPE_DATA) {
+    } else if (stream_type == FLV_STREAM_TYPE_SUBTITLE) {
         st->codecpar->codec_id = AV_CODEC_ID_TEXT;
     }
 
@@ -1253,7 +1253,7 @@  retry_duration:
 
     if (    stream_type == FLV_STREAM_TYPE_AUDIO ||
             ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY) ||
-            stream_type == FLV_STREAM_TYPE_DATA)
+            stream_type == FLV_STREAM_TYPE_SUBTITLE)
         pkt->flags |= AV_PKT_FLAG_KEY;
 
 leave: