From: Aurelien Jacobs Date: Thu, 18 Oct 2007 22:01:30 +0000 (+0000) Subject: move vp6 header parsing into its own function X-Git-Tag: v0.5~7191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4097430843231feb66ac4d264740ef521ff0e95;p=platform%2Fupstream%2Flibav.git move vp6 header parsing into its own function Originally committed as revision 10789 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index df69d5a..dc13f68 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -137,6 +137,18 @@ static int process_audio_header_elements(AVFormatContext *s) return 1; } +static int process_video_header_vp6(AVFormatContext *s) +{ + EaDemuxContext *ea = s->priv_data; + ByteIOContext *pb = &s->pb; + + url_fskip(pb, 16); + ea->time_base.den = get_le32(pb); + ea->time_base.num = get_le32(pb); + + return 1; +} + /* * Process EA file header * Returns 1 if the EA file is valid and successfully opened, 0 otherwise @@ -149,9 +161,7 @@ static int process_ea_header(AVFormatContext *s) { blockid = get_le32(pb); if (blockid == MVhd_TAG) { size = get_le32(pb); - url_fskip(pb, 16); - ea->time_base.den = get_le32(pb); - ea->time_base.num = get_le32(pb); + process_video_header_vp6(s); url_fskip(pb, size-32); blockid = get_le32(pb); }