]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pcm-mpeg.c
ffplay: give more meaningful names to the buffersink instances
[ffmpeg] / libavcodec / pcm-mpeg.c
index 9c49a0d9ec9550108ac2c37ba4c7a6f6394a3d35..832f301c35efc82cc74875586b03bb0a7db81c73 100644 (file)
@@ -78,7 +78,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
     if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
         avctx->bits_per_raw_sample = avctx->bits_per_coded_sample;
 
-    /* get the sample rate. Not all values are known or exist. */
+    /* get the sample rate. Not all values are used. */
     switch (header[2] & 0x0f) {
     case 1:
         avctx->sample_rate = 48000;
@@ -91,13 +91,13 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
         break;
     default:
         avctx->sample_rate = 0;
-        av_log(avctx, AV_LOG_ERROR, "unsupported sample rate (%d)\n",
+        av_log(avctx, AV_LOG_ERROR, "reserved sample rate (%d)\n",
                header[2] & 0x0f);
         return -1;
     }
 
     /*
-     * get the channel number (and mapping). Not all values are known or exist.
+     * get the channel number (and mapping). Not all values are used.
      * It must be noted that the number of channels in the MPEG stream can
      * differ from the actual meaningful number, e.g. mono audio still has two
      * channels, one being empty.
@@ -105,7 +105,7 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx,
     avctx->channel_layout  = channel_layouts[channel_layout];
     avctx->channels        =        channels[channel_layout];
     if (!avctx->channels) {
-        av_log(avctx, AV_LOG_ERROR, "unsupported channel configuration (%d)\n",
+        av_log(avctx, AV_LOG_ERROR, "reserved channel configuration (%d)\n",
                channel_layout);
         return -1;
     }
@@ -312,7 +312,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
     if (avctx->debug & FF_DEBUG_BITSTREAM)
         av_dlog(avctx, "pcm_bluray_decode_frame: decoded %d -> %d bytes\n",
                 retval, buf_size);
-    return retval;
+    return retval + 4;
 }
 
 AVCodec ff_pcm_bluray_decoder = {
@@ -323,7 +323,8 @@ AVCodec ff_pcm_bluray_decoder = {
     .init           = pcm_bluray_decode_init,
     .decode         = pcm_bluray_decode_frame,
     .capabilities   = CODEC_CAP_DR1,
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32,
-                                         AV_SAMPLE_FMT_NONE},
-    .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"),
+    .sample_fmts    = (const enum AVSampleFormat[]){
+        AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE
+    },
+    .long_name      = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"),
 };