Motion - Ffmpeg Codec Patch

FFMpeg Codec Compilation Patch


First, see the following bug report: BugReport2005x08x05x210647

The problem is that the codec field in struct AVStream has changed type from struct AVCodecContext to struct AVCodecContext *, for a good reason I'm not going into here. This of course breaks compilation of Motion. This patch updates Motion to compile with both previous versions of FFMpeg and the current CVS version.

Description of Patch

The patch contains:

  • Updates to ffmpeg.c to handle the new CVS version of FFMpeg.
  • Cosmetic code changes.

Now, the cosmetic code changes shouldn't affect any functionality, but given that it's late here and I need sleep, I wouldn't be surprised if I broke something. wink

Installation of Patch

Standard patch procedure:

  1. Change to the Motion source directory.
  2. Issue the command zcat motion-3.2.2_snap10-ff_v2.patch.gz | patch -p1
  3. Compile and enjoy (hopefully)!

Note that the patch should be applied to a clean snap10, but I don't think any other current patch affects ffmpeg.c anyway...

Change History of Patch

  • Version 1 (6-Aug-2005):
    • Fixes compilation against FFMpeg with libavformat build version 4629 and higher.
  • Version 2 (6-Aug-2005):
    • Less cluttering with #ifdefs in the code.

Discussion and Comments

Thanks once again Per.

I have integrated the patch into my sources.

It will be included in 3.2.2_snap11


-- KennethLavrsen - 06 Aug 2005

Good! I just uploaded a second version of the patch with less #ifdefs in the code (i.e., less cluttering). Instead of having an #ifdef every time codec is used, I created a macro that expands to codec as a pointer depending on libavformat build.

I also found and fixed some more cosmetic/code standard "errors".

-- PerJonsson - 06 Aug 2005

V2 integrated and will be in 3.2.2_snap11

-- KennethLavrsen - 07 Aug 2005
Topic revision: r5 - 13 Aug 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.