[vlc-devel] [PATCH] libmp4: rewind stream before falling back to avformat

Rémi Denis-Courmont remi at remlab.net
Sun Jan 20 22:28:35 CET 2013


Seeking is not a very good idea as it can always fail.

Normally, a demuxer shall not move the stream pointer in the Open() function 
unless it returns VLC_SUCCESS.

Le dimanche 20 janvier 2013 23:15:02, Frédéric Yhuel a écrit :
> ---
>  modules/demux/mp4/libmp4.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
> index 9f467a0..8979691 100644
> --- a/modules/demux/mp4/libmp4.c
> +++ b/modules/demux/mp4/libmp4.c
> @@ -3609,6 +3609,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *s )
> 
>  error:
>      free( p_root );
> +    stream_Seek( p_stream, 0 );
>      return NULL;
>  }

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list