diff mbox series

[FFmpeg-devel,3/8] avformat/mpegts: add support for stream_type 0xd2, which is AVS2

Message ID 1633963925-13579-3-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit a59f8ea2a9104b47b231a73a4c6bd0678fd9529c
Headers show
Series [FFmpeg-devel,1/8] avformat: add raw avs3 muxer | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Lance Wang Oct. 11, 2021, 2:52 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

GB/T 17975.1
Information technology-Generic coding of moving pictures and associated audio
information-Part 1:Systems

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
 libavformat/mpegts.h    | 1 +
 libavformat/mpegtsenc.c | 3 +++
 2 files changed, 4 insertions(+)
diff mbox series


diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h
index c75ba08..910d65a 100644
--- a/libavformat/mpegts.h
+++ b/libavformat/mpegts.h
@@ -129,6 +129,7 @@ 
 #define STREAM_TYPE_VIDEO_H264      0x1b
 #define STREAM_TYPE_VIDEO_HEVC      0x24
 #define STREAM_TYPE_VIDEO_CAVS      0x42
+#define STREAM_TYPE_VIDEO_AVS2      0xd2
 #define STREAM_TYPE_VIDEO_VC1       0xea
 #define STREAM_TYPE_VIDEO_DIRAC     0xd1
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 98dac17..f3b7914 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -366,6 +366,9 @@  static int get_dvb_stream_type(AVFormatContext *s, AVStream *st)
     case AV_CODEC_ID_CAVS:
         stream_type = STREAM_TYPE_VIDEO_CAVS;
+    case AV_CODEC_ID_AVS2:
+        stream_type = STREAM_TYPE_VIDEO_AVS2;
+        break;
     case AV_CODEC_ID_DIRAC:
         stream_type = STREAM_TYPE_VIDEO_DIRAC;