[FFmpeg-cvslog] r26297 - trunk/libavcodec/mpegaudiodec.c
elenril
subversion
Mon Jan 10 12:36:11 CET 2011
Author: elenril
Date: Mon Jan 10 12:36:11 2011
New Revision: 26297
Log:
Handle ID3v1 tag while decoding mp[123] frames
patch by Cl?ment B?sch (ubitux at gmail)
Modified:
trunk/libavcodec/mpegaudiodec.c
Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c Mon Jan 10 12:02:07 2011 (r26296)
+++ trunk/libavcodec/mpegaudiodec.c Mon Jan 10 12:36:11 2011 (r26297)
@@ -27,6 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "libavformat/id3v1.h"
/*
* TODO:
@@ -2043,6 +2044,13 @@ static int decode_frame(AVCodecContext *
header = AV_RB32(buf);
if(ff_mpa_check_header(header) < 0){
+
+ if (buf_size == ID3v1_TAG_SIZE
+ && buf[0] == 'T' && buf[1] == 'A' && buf[2] == 'G') {
+ *data_size = 0;
+ return ID3v1_TAG_SIZE;
+ }
+
av_log(avctx, AV_LOG_ERROR, "Header missing\n");
return -1;
}
More information about the ffmpeg-cvslog
mailing list