Advertisement
Guest User

Untitled

a guest
Sep 5th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.98 KB | None | 0 0
  1. 1001-fix-ffmpeg-6.0.diff
  2. ----------------------------------------------------
  3.  
  4. Description: fixes a compilation error with ffmpeg 6.0: "'av_log_level'
  5. undeclared (first use in this function)". Patch inspired by the one in debian
  6. bug 591516 by Reinhard Tartler.
  7. Author: Fabrice Coutadeur <fabricesp@ubuntu.com>
  8. --- /imageshack-uploader/ffmpeg_fas.c
  9. +++ ./ffmpeg_fas_patched.c
  10. @@ -80,6 +80,7 @@
  11.  
  12. } fas_context_type;
  13.  
  14. +static int av_log_level;
  15. static char* invalid_error_code = "not a valid error code";
  16. static char *gbl_error_strings[NUM_POSSIBLE_ERRORS] =
  17. {
  18. @@ -176,6 +177,7 @@
  19. fas_set_logging(logging);
  20. fas_set_format(format);
  21. av_register_all();
  22. + av_log_level = av_log_get_level();
  23.  
  24. return;
  25. }
  26.  
  27. 1002-fix-FTBFS-libav-0.7.diff
  28. ----------------------------------------------------
  29.  
  30. Description: fix FTBFS with libav 0.7 because deprecated values and functions
  31. has been dropped
  32. Author: Fabrice Coutadeur <fabricesp@ubuntu.com>
  33.  
  34. --- ./imageshack-uploader/ffmpeg_fas.c
  35. +++ ./ffmpeg_fas_patched.c
  36. @@ -228,7 +228,7 @@
  37. int stream_idx;
  38. for (stream_idx = 0; stream_idx < fas_context->format_context->nb_streams; stream_idx++)
  39. {
  40. - if (fas_context->format_context->streams[stream_idx]->codec->codec_type == CODEC_TYPE_VIDEO)
  41. + if (fas_context->format_context->streams[stream_idx]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
  42. {
  43. fas_context->stream_idx = stream_idx;
  44. fas_context->codec_context = fas_context->format_context->streams[stream_idx]->codec;
  45. @@ -382,7 +382,7 @@
  46. /* note this -1 approach to setting the packet is a workaround for a common failure. setting
  47. to 0 would work just incur a huge penalty in videos that needed -1. Might be worth testing.
  48. */
  49. - if (packet.flags & PKT_FLAG_KEY)
  50. + if (packet.flags & AV_PKT_FLAG_KEY)
  51. {
  52. //fprintf(stderr, "Packet: (F:%d %lld %lld)\n", context->current_frame_index, packet.pts, packet.dts);
  53.  
  54. @@ -392,8 +392,13 @@
  55. context->keyframe_packet_dts = context->previous_dts;
  56. }
  57.  
  58. +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,23,0)
  59. + avcodec_decode_video2( context->codec_context, context->frame_buffer,
  60. + &frameFinished, &packet );
  61. +#else
  62. avcodec_decode_video(context->codec_context, context->frame_buffer, &frameFinished,
  63. packet.data, packet.size);
  64. +#endif
  65.  
  66. if (frameFinished)
  67. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement