Mercurial > libavformat.hg
changeset 2629:eaebf51f195d libavformat
move vp6 header parsing into its own function
author | aurel |
---|---|
date | Thu, 18 Oct 2007 22:01:30 +0000 |
parents | 93cc89cb0c9c |
children | eb9371d9c590 |
files | electronicarts.c |
diffstat | 1 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/electronicarts.c Thu Oct 18 21:59:23 2007 +0000 +++ b/electronicarts.c Thu Oct 18 22:01:30 2007 +0000 @@ -137,6 +137,18 @@ 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 @@ 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); }