]> git.pld-linux.org Git - packages/avifile.git/blob - avifile-fix-no-bits_per_sample.patch
- enhanced ffmpeg patch to cover 4.x
[packages/avifile.git] / avifile-fix-no-bits_per_sample.patch
1 --- avifile-0.7-0.7.45/lib/aviread/FFReadStream.cpp.old 2008-10-05 00:33:50.000000000 +0200
2 +++ avifile-0.7-0.7.45/lib/aviread/FFReadStream.cpp     2008-10-05 00:34:17.000000000 +0200
3 @@ -215,7 +215,7 @@
4             wf->nSamplesPerSec = avs->codec->sample_rate;
5             wf->nAvgBytesPerSec = avs->codec->bit_rate / 8;
6              wf->nBlockAlign = avs->codec->block_align;
7 -           wf->wBitsPerSample = avs->codec->bits_per_sample;
8 +           wf->wBitsPerSample = avs->codec->bits_per_coded_sample;
9             if (lSize >= (sizeof(WAVEFORMATEX) + avs->codec->extradata_size)
10                 && avs->codec->extradata)
11             {
12 @@ -239,7 +239,7 @@
13             bh->biHeight = avs->codec->height;
14             bh->biPlanes = 1;
15             bh->biCompression = avs->codec->codec_tag;
16 -            bh->biBitCount = avs->codec->bits_per_sample;
17 +            bh->biBitCount = avs->codec->bits_per_coded_sample;
18              // hack which might be eventually usefull
19             memcpy(&bh->biXPelsPerMeter, &m_pHandler->m_pContext, sizeof(void*));
20             if (bh->biCompression == 0)
21 --- avifile-0.7-0.7.45/plugins/libffmpeg/FFVideoDecoder.cpp.old 2008-10-05 00:44:29.000000000 +0200
22 +++ avifile-0.7-0.7.45/plugins/libffmpeg/FFVideoDecoder.cpp     2008-10-05 00:45:45.000000000 +0200
23 @@ -175,7 +175,7 @@
24         m_pAvContext = avcodec_alloc_context();
25          // for autodetection errors
26         m_pAvContext->codec_tag = m_pFormat->biCompression;
27 -       m_pAvContext->bits_per_sample = m_pFormat->biBitCount;
28 +       m_pAvContext->bits_per_coded_sample = m_pFormat->biBitCount;
29          m_pAvContext->width = m_Dest.biWidth;
30         m_pAvContext->height = (m_Dest.biHeight < 0) ? -m_Dest.biHeight : m_Dest.biHeight;
31         m_pAvContext->get_buffer = avcodec_default_get_buffer;
32 --- avifile-0.7-0.7.45/plugins/libffmpeg/FFAudioDecoder.cpp.old 2008-10-05 00:43:45.000000000 +0200
33 +++ avifile-0.7-0.7.45/plugins/libffmpeg/FFAudioDecoder.cpp     2008-10-05 00:43:57.000000000 +0200
34 @@ -50,7 +50,7 @@
35         }
36      }
37      int framesz = 0;
38 -    int hr = avcodec_decode_audio(m_pAvContext, (int16_t*)out_data, &framesz,
39 +    int hr = avcodec_decode_audio2(m_pAvContext, (int16_t*)out_data, &framesz,
40                                   (uint8_t*)in_data, in_size);
41      //printf("CONVERT  i:%d  o:%d  f:%d   h:%d\n", in_size, out_size, framesz, hr);
42      if (size_read)
This page took 0.078383 seconds and 3 git commands to generate.