On Sat, 2008-09-27 at 20:38 -0300, rafael2k wrote:
> Hey people,
> Thank you all !!
> Very nice to see cinelerra cv project getting always re-newed :)
>
> bye,
> rafael diniz
>
> Em Saturday 27 September 2008, Johannes Sixt escreveu:
> > On Samstag, 27. September 2008, rafael2k wrote:
> > > Ow, it was quite easy to fix.
> > > Can anyone review the patch to fix cinelerra w/ the newer ffmpeg API?
> > > I think the fix is correct, as I got it looking at the ffmpeg svn diff.
> > >
> > > ps: how will I version my cinelerra packages? git has no revision number!
> > > ps2: can anyone make a tag that represents the svn r1061 in the git repo?
> >
> > The solution is that you maintain your own git repository (Cillian is about
> > to set one up for you). You can put the tag there. Then you can also invent
> > your own naming scheme. And you can place additional changes there if you
> > have such.
>
The required patch as proposed by Rafael2k and augmented by Nicolas to
cope with FFmpeg version 51 as well as version 52 are here listed
inline.
---------------
diff --git a/quicktime/mpeg4.c b/quicktime/mpeg4.c
index d418f66..9bab00f 100644
--- a/quicktime/mpeg4.c
+++ b/quicktime/mpeg4.c
@@ -671,7 +671,11 @@ static int encode(quicktime_t *file, unsigned char
**row_pointers, int track)
context->b_quant_factor = 1.25;
context->b_quant_offset = 1.25;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
context->error_resilience = FF_ER_CAREFUL;
+ #else
+ context->error_recognition = FF_ER_CAREFUL;
+ #endif
context->error_concealment = 3;
context->frame_skip_cmp = FF_CMP_DCTMAX;
context->ildct_cmp = FF_CMP_VSAD;
diff --git a/quicktime/wma.c b/quicktime/wma.c
index 6ceefe5..452f72d 100644
--- a/quicktime/wma.c
+++ b/quicktime/wma.c
@@ -187,12 +187,22 @@ printf("decode 2 %x %llx %llx\n", chunk_size,
chunk_offset, chunk_offset + chunk
// Decode chunk into work buffer.
pthread_mutex_lock(&ffmpeg_lock);
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
result = avcodec_decode_audio(codec->decoder_context,
(int16_t*)(codec->work_buffer +
codec->output_size * sample_size),
- &bytes_decoded,
- codec->packet_buffer,
+ &bytes_decoded,
+ codec->packet_buffer,
chunk_size);
- pthread_mutex_unlock(&ffmpeg_lock);
+ #else
+ bytes_decoded = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+ result = avcodec_decode_audio2(codec->decoder_context,
+ (int16_t*)(codec->work_buffer +
codec->output_size * sample_size),
+ &bytes_decoded,
+ codec->packet_buffer,
+ chunk_size);
+ #endif
+
+ pthread_mutex_unlock(&ffmpeg_lock);
if(bytes_decoded <= 0)
{
try++;
------------
I hope someone can commit this into the mainstream branch. I still have
to figure out how git is exactly working :(
BTW: I used the latest FFmpeg r15444 and the latest git clone for x264.
Cinelerra and mplayer are now compiling "smoothly" and execute as
before.
Kind Regards,
Frans de Boer.
_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra