Commit 289691ce authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: handle pps/sps less AVC Intra (fix #15762)

parent 69cf3262
......@@ -197,6 +197,7 @@ libmp4_plugin_la_SOURCES = demux/mp4/mp4.c demux/mp4/mp4.h \
demux/mp4/libmp4.c demux/mp4/libmp4.h \
demux/mp4/id3genres.h demux/mp4/languages.h \
demux/asf/asfpacket.c demux/asf/asfpacket.h \
demux/mp4/avci.h \
demux/mp4/essetup.c demux/mp4/meta.c
libmp4_plugin_la_LIBADD = $(LIBM)
libmp4_plugin_la_LDFLAGS = $(AM_LDFLAGS)
......
......@@ -25,6 +25,7 @@
#endif
#include "mp4.h"
#include "avci.h"
#include <vlc_demux.h>
#include <vlc_aout.h>
......@@ -395,6 +396,32 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
break;
}
case VLC_FOURCC( 'a', 'i', '5', 'p' ):
case VLC_FOURCC( 'a', 'i', '5', 'q' ):
case VLC_FOURCC( 'a', 'i', '5', '2' ):
case VLC_FOURCC( 'a', 'i', '5', '3' ):
case VLC_FOURCC( 'a', 'i', '5', '5' ):
case VLC_FOURCC( 'a', 'i', '5', '6' ):
case VLC_FOURCC( 'a', 'i', '1', 'p' ):
case VLC_FOURCC( 'a', 'i', '1', 'q' ):
case VLC_FOURCC( 'a', 'i', '1', '2' ):
case VLC_FOURCC( 'a', 'i', '1', '3' ):
case VLC_FOURCC( 'a', 'i', '1', '5' ):
case VLC_FOURCC( 'a', 'i', '1', '6' ):
{
if( !p_track->fmt.i_extra && p_track->fmt.video.i_width < UINT16_MAX )
{
const MP4_Box_t *p_fiel = MP4_BoxGet( p_sample, "fiel" );
if( p_fiel && BOXDATA(p_fiel) )
{
p_track->fmt.p_extra =
AVCi_create_AnnexB( p_track->fmt.video.i_width,
!!BOXDATA(p_fiel)->i_flags, &p_track->fmt.i_extra );
}
}
break;
}
default:
msg_Dbg( p_demux, "Unrecognized FourCC %4.4s", (char *)&p_sample->i_type );
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment