printf("Audio decoding\n");
- /* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
- memset(inbuf + INBUF_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-
/* find the mpeg audio decoder */
codec = avcodec_find_decoder(CODEC_ID_MP2);
if (!codec) {
picture= avcodec_alloc_frame();
if(codec->capabilities&CODEC_CAP_TRUNCATED)
- c->flags|= CODEC_FLAG_TRUNCATED; /* we dont send complete frames */
+ c->flags|= CODEC_FLAG_TRUNCATED; /* we do not send complete frames */
- /* for some codecs, such as msmpeg4 and mpeg4, width and height
- MUST be initialized there because these info are not available
- in the bitstream */
+ /* For some codecs, such as msmpeg4 and mpeg4, width and height
+ MUST be initialized there because this information is not
+ available in the bitstream. */
/* open it */
if (avcodec_open(c, codec) < 0) {
/* must be called before using avcodec lib */
avcodec_init();
- /* register all the codecs (you can also register only the codec
- you wish to have smaller code */
+ /* register all the codecs */
avcodec_register_all();
if (argc <= 1) {