[FFmpeg-soc] [soc]: r2258 - in eac3: ac3dec.c checkout.sh ffmpeg.patch

jbr subversion at mplayerhq.hu
Fri May 30 04:48:56 CEST 2008


Author: jbr
Date: Fri May 30 04:48:55 2008
New Revision: 2258

Log:
make CRC error an enum value

Modified:
   eac3/ac3dec.c
   eac3/checkout.sh
   eac3/ffmpeg.patch

Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c	(original)
+++ eac3/ac3dec.c	Fri May 30 04:48:55 2008
@@ -1235,11 +1235,11 @@ static int ac3_decode_frame(AVCodecConte
     if(err != AC3_PARSE_ERROR_FRAME_SIZE && avctx->error_resilience >= FF_ER_CAREFUL) {
         if(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2], s->frame_size-2)) {
             av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n");
-            err = 1;
+            err = AC3_PARSE_ERROR_CRC;
         }
     }
 
-    if(err && err != 1) {
+    if(err && err != AC3_PARSE_ERROR_CRC) {
         switch(err) {
             case AC3_PARSE_ERROR_SYNC:
                 av_log(avctx, AV_LOG_ERROR, "frame sync error\n");

Modified: eac3/checkout.sh
==============================================================================
--- eac3/checkout.sh	(original)
+++ eac3/checkout.sh	Fri May 30 04:48:55 2008
@@ -1,7 +1,7 @@
 FILES="eac3dec.c ac3dec.c ac3dec.h ac3dec_data.c ac3dec_data.h"
 
 echo "checking out ffmpeg svn"
-for i in $FILES Makefile ac3_parser.c ac3enc.c ac3.c ac3.h; do
+for i in $FILES Makefile ac3_parser.c ac3_parser.h ac3enc.c ac3.c ac3.h; do
     rm -f ffmpeg/libavcodec/$i
 done
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk/ ffmpeg -r 13545

Modified: eac3/ffmpeg.patch
==============================================================================
--- eac3/ffmpeg.patch	(original)
+++ eac3/ffmpeg.patch	Fri May 30 04:48:55 2008
@@ -85,6 +85,18 @@ Index: libavcodec/ac3_parser.c
          hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
      }
  
+Index: libavcodec/ac3_parser.h
+===================================================================
+--- libavcodec/ac3_parser.h	(revision 13545)
++++ libavcodec/ac3_parser.h	(working copy)
+@@ -32,6 +32,7 @@
+     AC3_PARSE_ERROR_SAMPLE_RATE = -3,
+     AC3_PARSE_ERROR_FRAME_SIZE  = -4,
+     AC3_PARSE_ERROR_FRAME_TYPE  = -5,
++    AC3_PARSE_ERROR_CRC         = -6,
+ } AC3ParseError;
+ 
+ /**
 Index: libavcodec/ac3.c
 ===================================================================
 --- libavcodec/ac3.c	(revision 13545)



More information about the FFmpeg-soc mailing list