* Shorten decoder
* Copyright (c) 2005 Jeff Muizelaar
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*
*/
-#define DEBUG
#include <limits.h>
#include "avcodec.h"
#include "get_bits.h"
{
GetBitContext hb;
int len;
- int chunk_size;
short wave_format;
init_get_bits(&hb, header, header_size*8);
return -1;
}
- chunk_size = get_le32(&hb);
+ skip_bits_long(&hb, 32); /* chunk_size */
if (get_le32(&hb) != MKTAG('W','A','V','E')) {
av_log(avctx, AV_LOG_ERROR, "missing WAVE tag\n");
s->bitstream_size= buf_size;
if(buf_size < s->max_framesize){
- //dprintf(avctx, "wanna more data ... %d\n", buf_size);
*data_size = 0;
return input_buf_size;
}
s->cur_chan = 0;
goto frame_done;
}
- break;
}
break;
case FN_VERBATIM:
case FN_QUIT:
*data_size = 0;
return buf_size;
- break;
default:
av_log(avctx, AV_LOG_ERROR, "unknown shorten function %d\n", cmd);
return -1;
- break;
}
}
frame_done:
s->bitstream_index= 0;
}
-AVCodec shorten_decoder = {
+AVCodec ff_shorten_decoder = {
"shorten",
AVMEDIA_TYPE_AUDIO,
CODEC_ID_SHORTEN,