vlc | branch: master | Francois Cartegnie <[email protected]> | Wed Mar 14 17:00:27 2018 +0100| [5b903b447103ee6802c4e6f897a969bdbe5dce9c] | committer: Francois Cartegnie
demux: heif: add support for AVC > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b903b447103ee6802c4e6f897a969bdbe5dce9c --- modules/demux/mp4/heif.c | 10 +++++++++- modules/demux/mp4/libmp4.h | 2 ++ modules/demux/mp4/mp4.c | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/demux/mp4/heif.c b/modules/demux/mp4/heif.c index 4a65c2f534..ae8a8e96ad 100644 --- a/modules/demux/mp4/heif.c +++ b/modules/demux/mp4/heif.c @@ -265,6 +265,9 @@ static int DemuxHEIF( demux_t *p_demux ) case VLC_FOURCC('h','v','c','1'): es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_HEVC ); break; + case VLC_FOURCC('a','v','c','1'): + es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_H264 ); + break; case VLC_FOURCC('j','p','e','g'): es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_JPEG ); break; @@ -295,7 +298,10 @@ static int DemuxHEIF( demux_t *p_demux ) switch( p_prop->i_type ) { case ATOM_hvcC: - if( !fmt.p_extra && fmt.i_codec == VLC_CODEC_HEVC ) + case ATOM_avcC: + if( !fmt.p_extra && + ((fmt.i_codec == VLC_CODEC_HEVC && p_prop->i_type == ATOM_hvcC) || + (fmt.i_codec == VLC_CODEC_H264 && p_prop->i_type == ATOM_avcC)) ) { fmt.p_extra = malloc( p_prop->data.p_binary->i_blob ); if( fmt.p_extra ) @@ -434,10 +440,12 @@ int OpenHEIF( vlc_object_t * p_this ) case MAJOR_heic: case MAJOR_heix: case MAJOR_jpeg: + case MAJOR_avci: break; case MAJOR_msf1: case MAJOR_hevc: case MAJOR_hevx: + case MAJOR_avcs: default: return VLC_EGENERIC; } diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h index be93d12019..24c9183f96 100644 --- a/modules/demux/mp4/libmp4.h +++ b/modules/demux/mp4/libmp4.h @@ -50,6 +50,8 @@ typedef int64_t stime_t; #define MAJOR_hevx VLC_FOURCC( 'h', 'e', 'v', 'x' ) /* heif */ #define MAJOR_jpeg VLC_FOURCC( 'j', 'p', 'e', 'g' ) /* heif */ #define MAJOR_jpgs VLC_FOURCC( 'j', 'p', 'g', 's' ) /* heif */ +#define MAJOR_avci VLC_FOURCC( 'a', 'v', 'c', 'i' ) /* heif */ +#define MAJOR_avcs VLC_FOURCC( 'a', 'v', 'c', 's' ) /* heif */ #define ATOM_root VLC_FOURCC( 'r', 'o', 'o', 't' ) #define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' ) diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index b19050f066..8a16e41c3c 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -731,6 +731,7 @@ static int Open( vlc_object_t * p_this ) case MAJOR_heix: case MAJOR_mif1: case MAJOR_jpeg: + case MAJOR_avci: /* We don't yet support f4v, but avformat does. */ case MAJOR_f4v: return VLC_EGENERIC; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
