[FFmpeg-devel] [PATCH] libformat: Remove duplicate STREAM_TYPE constants from mpeg.h
Marton Balint
cus at passwd.hu
Wed Jun 3 23:44:13 EEST 2020
On Wed, 3 Jun 2020, Brad Hards wrote:
> These definitions (and more STREAM_TYPEs) are already provided in mpegts.h
>
> Signed-off-by: Brad Hards <bradh at frogmouth.net>
> ---
> libavformat/mpeg.c | 1 +
> libavformat/mpeg.h | 14 --------------
> 2 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
> index 265b2bd1ad..d9807d6d43 100644
> --- a/libavformat/mpeg.c
> +++ b/libavformat/mpeg.c
> @@ -23,6 +23,7 @@
> #include "avio_internal.h"
> #include "internal.h"
> #include "mpeg.h"
> +#include "mpegts.h"
Including mpegts.h into mpeg.c does not seem like a good idea.
Also I guess MPEG-PS and MPEG-TS may support different stream_types,
right? In that case it may make more sense to keep the two lists separate.
Regards,
Marton
>
> /*********************************************/
> /* demux code */
> diff --git a/libavformat/mpeg.h b/libavformat/mpeg.h
> index b635295776..b1d80df31a 100644
> --- a/libavformat/mpeg.h
> +++ b/libavformat/mpeg.h
> @@ -46,20 +46,6 @@
> #define LPCM_ID 0xa0
> #define SUB_ID 0x20
>
> -#define STREAM_TYPE_VIDEO_MPEG1 0x01
> -#define STREAM_TYPE_VIDEO_MPEG2 0x02
> -#define STREAM_TYPE_AUDIO_MPEG1 0x03
> -#define STREAM_TYPE_AUDIO_MPEG2 0x04
> -#define STREAM_TYPE_PRIVATE_SECTION 0x05
> -#define STREAM_TYPE_PRIVATE_DATA 0x06
> -#define STREAM_TYPE_AUDIO_AAC 0x0f
> -#define STREAM_TYPE_VIDEO_MPEG4 0x10
> -#define STREAM_TYPE_VIDEO_H264 0x1b
> -#define STREAM_TYPE_VIDEO_HEVC 0x24
> -#define STREAM_TYPE_VIDEO_CAVS 0x42
> -
> -#define STREAM_TYPE_AUDIO_AC3 0x81
> -
> static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 };
>
> /**
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list