changeset 2670:7e9a23c3f20d libavformat

EA ADPCM R1, R2 and R3 decoder original patch by Peter Ross
author aurel
date Wed, 24 Oct 2007 20:49:42 +0000
parents 09eb62fa2a0e
children 7f320fb9f1c9
files electronicarts.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/electronicarts.c	Wed Oct 24 14:22:56 2007 +0000
+++ b/electronicarts.c	Wed Oct 24 20:49:42 2007 +0000
@@ -149,6 +149,16 @@
     switch (compression_type) {
     case  0: ea->audio_codec = CODEC_ID_PCM_S16LE; break;
     case  7: ea->audio_codec = CODEC_ID_ADPCM_EA; break;
+    case -1:
+        switch (revision) {
+        case  1: ea->audio_codec = CODEC_ID_ADPCM_EA_R1; break;
+        case  2: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;
+        case  3: ea->audio_codec = CODEC_ID_ADPCM_EA_R3; break;
+        default:
+            av_log(s, AV_LOG_ERROR, "unsupported stream type; revision=%i\n", revision);
+            return 0;
+        }
+        break;
     default:
         av_log(s, AV_LOG_ERROR, "unsupported stream type; compression_type=%i\n", compression_type);
         return 0;