Index: chromium/patches/to_upstream/53_matroska_codec_config.patch |
diff --git a/chromium/patches/to_upstream/53_matroska_codec_config.patch b/chromium/patches/to_upstream/53_matroska_codec_config.patch |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c344068edde3de8ef28ec7628b7069dd66d1c3fd |
--- /dev/null |
+++ b/chromium/patches/to_upstream/53_matroska_codec_config.patch |
@@ -0,0 +1,41 @@ |
+diff -wurp -N orig/libavformat/matroskadec.c ffmpeg/libavformat/matroskadec.c |
+--- orig/libavformat/matroskadec.c 2012-02-01 06:28:26.500764099 -0800 |
++++ ffmpeg/libavformat/matroskadec.c 2012-02-01 08:14:02.540453816 -0800 |
+@@ -1542,7 +1542,9 @@ static int matroska_read_header(AVFormat |
+ } else if (codec_id == CODEC_ID_RA_144) { |
+ track->audio.out_samplerate = 8000; |
+ track->audio.channels = 1; |
+- } else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK || |
++ } |
++#if CONFIG_RA_288_DECODER || CONFIG_COOK_DECODER || CONFIG_ATRAC3_DECODER || CONFIG_SIPR_DECODER |
++ else if (codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK || |
+ codec_id == CODEC_ID_ATRAC3 || codec_id == CODEC_ID_SIPR) { |
+ int flavor; |
+ ffio_init_context(&b, track->codec_priv.data,track->codec_priv.size, |
+@@ -1570,6 +1572,7 @@ static int matroska_read_header(AVFormat |
+ extradata_offset = 78; |
+ } |
+ } |
++#endif |
+ track->codec_priv.size -= extradata_offset; |
+ |
+ if (codec_id == CODEC_ID_NONE) |
+@@ -1887,6 +1890,7 @@ static int matroska_parse_block(Matroska |
+ |
+ if (res == 0) { |
+ for (n = 0; n < laces; n++) { |
++#if CONFIG_RA_288_DECODER || CONFIG_COOK_DECODER || CONFIG_ATRAC3_DECODER || CONFIG_SIPR_DECODER |
+ if ((st->codec->codec_id == CODEC_ID_RA_288 || |
+ st->codec->codec_id == CODEC_ID_COOK || |
+ st->codec->codec_id == CODEC_ID_SIPR || |
+@@ -1933,7 +1937,9 @@ static int matroska_parse_block(Matroska |
+ pkt->stream_index = st->index; |
+ dynarray_add(&matroska->packets,&matroska->num_packets,pkt); |
+ } |
+- } else { |
++ } else |
++#endif |
++ { |
+ MatroskaTrackEncoding *encodings = track->encodings.elem; |
+ int offset = 0, pkt_size = lace_size[n]; |
+ uint8_t *pkt_data = data; |