summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg/A02-dca-resync.patch
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-01-12 21:48:54 +0000
committerjstebbins <[email protected]>2014-01-12 21:48:54 +0000
commitd69e6b4612a40ba2a4714ac8e02a9b4fea6bb03c (patch)
treed51d1d3b5f01a2ea27b97c2eed8ddc26865ec333 /contrib/ffmpeg/A02-dca-resync.patch
parenta42fd932a3fdc837bd7d7c8d83f7f0a335f18ce7 (diff)
bump libav, libav-v10_alpha1-90-g63debaa
Adds interlaced VC1 and HEVC support. Eliminates the need for most of our local patches. Many assorted bug fixes and improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5962 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/ffmpeg/A02-dca-resync.patch')
-rw-r--r--contrib/ffmpeg/A02-dca-resync.patch73
1 files changed, 0 insertions, 73 deletions
diff --git a/contrib/ffmpeg/A02-dca-resync.patch b/contrib/ffmpeg/A02-dca-resync.patch
deleted file mode 100644
index bbd9ad7ed..000000000
--- a/contrib/ffmpeg/A02-dca-resync.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 9922584ba3b5b02d913e629ea74d72e994870873 Mon Sep 17 00:00:00 2001
-From: John Stebbins <[email protected]>
-Date: Thu, 17 Jan 2013 19:57:26 +0100
-Subject: [PATCH] dca_parser: Handle changes in dca frame size
-
-A change in framesize caused a perpetual loss of synchronization.
-So read (and use) the frame size from the frame header instead of
-setting it only once.
----
- libavcodec/dca_parser.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
-index ab235cf..12180f3 100644
---- a/libavcodec/dca_parser.c
-+++ b/libavcodec/dca_parser.c
-@@ -62,10 +62,12 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf,
- if (IS_MARKER(state, i, buf, buf_size)) {
- if (pc1->lastmarker && state == pc1->lastmarker) {
- start_found = 1;
-+ i++;
- break;
- } else if (!pc1->lastmarker) {
- start_found = 1;
- pc1->lastmarker = state;
-+ i++;
- break;
- }
- }
-@@ -80,9 +82,6 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf,
- if (state == pc1->lastmarker && IS_MARKER(state, i, buf, buf_size)) {
- if(pc1->framesize > pc1->size)
- continue;
-- if(!pc1->framesize){
-- pc1->framesize = pc1->hd_pos ? pc1->hd_pos : pc1->size;
-- }
- pc->frame_start_found = 0;
- pc->state = -1;
- pc1->size = 0;
-@@ -139,7 +138,7 @@ int ff_dca_convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst,
- }
-
- static int dca_parse_params(const uint8_t *buf, int buf_size, int *duration,
-- int *sample_rate)
-+ int *sample_rate, int *framesize)
- {
- GetBitContext gb;
- uint8_t hdr[12 + FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
-@@ -159,7 +158,11 @@ static int dca_parse_params(const uint8_t *buf, int buf_size, int *duration,
- return AVERROR_INVALIDDATA;
- *duration = 256 * (sample_blocks / 8);
-
-- skip_bits(&gb, 20);
-+ *framesize = get_bits(&gb, 14) + 1;
-+ if (*framesize < 95)
-+ return AVERROR_INVALIDDATA;
-+
-+ skip_bits(&gb, 6);
- sr_code = get_bits(&gb, 4);
- *sample_rate = avpriv_dca_sample_rates[sr_code];
- if (*sample_rate == 0)
-@@ -190,7 +193,7 @@ static int dca_parse(AVCodecParserContext * s,
- }
-
- /* read the duration and sample rate from the frame header */
-- if (!dca_parse_params(buf, buf_size, &duration, &sample_rate)) {
-+ if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) {
- s->duration = duration;
- avctx->sample_rate = sample_rate;
- } else
---
-1.7.10.4
-