diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 22:32:26 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-10-18 22:32:26 +0000 |
commit | 2c82386df26decb4c322e64e0beb6657f55946bc (patch) | |
tree | f5f6dfe2d38aa4c2fc748e5267221ca8dbaf6b75 /libavformat | |
parent | fa34563b2cda4efe9a0d02826fb71ed383f54f77 (diff) | |
download | ffmpeg-2c82386df26decb4c322e64e0beb6657f55946bc.tar.gz |
add some error processing
Originally committed as revision 10794 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/electronicarts.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 9fd109a811..b41f8d51ed 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -166,6 +166,7 @@ static int process_ea_header(AVFormatContext *s) { for (i=0; i<5 && (!ea->audio_codec || !ea->video_codec); i++) { unsigned int startpos = url_ftell(pb); + int err = 0; blockid = get_le32(pb); size = get_le32(pb); @@ -179,14 +180,19 @@ static int process_ea_header(AVFormatContext *s) { av_log (s, AV_LOG_ERROR, "unknown SCHl headerid\n"); return 0; } - process_audio_header_elements(s); + err = process_audio_header_elements(s); break; case MVhd_TAG : - process_video_header_vp6(s); + err = process_video_header_vp6(s); break; } + if (err < 0) { + av_log(s, AV_LOG_ERROR, "error parsing header: %i\n", err); + return err; + } + url_fseek(pb, startpos + size, SEEK_SET); } |