dcadec: set AV_FRAME_DATA_MATRIXENCODING side data.
authorTim Walker <tdskywalker@gmail.com>
Wed, 11 Dec 2013 02:03:31 +0000 (02:03 +0000)
committerTim Walker <tdskywalker@gmail.com>
Sun, 5 Jan 2014 15:41:56 +0000 (16:41 +0100)
libavcodec/dcadec.c

index f3afb4e..f9e39bc 100644 (file)
@@ -2001,6 +2001,15 @@ FF_ENABLE_DEPRECATION_WARNINGS
     for (i = 0; i < 2 * s->lfe * 4; i++)
         s->lfe_data[i] = s->lfe_data[i + lfe_samples];
 
+    /* AVMatrixEncoding
+     *
+     * DCA_STEREO_TOTAL (Lt/Rt) is equivalent to Dolby Surround */
+    ret = ff_side_data_update_matrix_encoding(frame,
+                                              (s->output & ~DCA_LFE) == DCA_STEREO_TOTAL ?
+                                              AV_MATRIX_ENCODING_DOLBY : AV_MATRIX_ENCODING_NONE);
+    if (ret < 0)
+        return ret;
+
     *got_frame_ptr = 1;
 
     return buf_size;