Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1001-fix-ffmpeg-6.0.diff
- ----------------------------------------------------
- Description: fixes a compilation error with ffmpeg 6.0: "'av_log_level'
- undeclared (first use in this function)". Patch inspired by the one in debian
- bug 591516 by Reinhard Tartler.
- Author: Fabrice Coutadeur <fabricesp@ubuntu.com>
- --- /imageshack-uploader/ffmpeg_fas.c
- +++ ./ffmpeg_fas_patched.c
- @@ -80,6 +80,7 @@
- } fas_context_type;
- +static int av_log_level;
- static char* invalid_error_code = "not a valid error code";
- static char *gbl_error_strings[NUM_POSSIBLE_ERRORS] =
- {
- @@ -176,6 +177,7 @@
- fas_set_logging(logging);
- fas_set_format(format);
- av_register_all();
- + av_log_level = av_log_get_level();
- return;
- }
- 1002-fix-FTBFS-libav-0.7.diff
- ----------------------------------------------------
- Description: fix FTBFS with libav 0.7 because deprecated values and functions
- has been dropped
- Author: Fabrice Coutadeur <fabricesp@ubuntu.com>
- --- ./imageshack-uploader/ffmpeg_fas.c
- +++ ./ffmpeg_fas_patched.c
- @@ -228,7 +228,7 @@
- int stream_idx;
- for (stream_idx = 0; stream_idx < fas_context->format_context->nb_streams; stream_idx++)
- {
- - if (fas_context->format_context->streams[stream_idx]->codec->codec_type == CODEC_TYPE_VIDEO)
- + if (fas_context->format_context->streams[stream_idx]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
- {
- fas_context->stream_idx = stream_idx;
- fas_context->codec_context = fas_context->format_context->streams[stream_idx]->codec;
- @@ -382,7 +382,7 @@
- /* note this -1 approach to setting the packet is a workaround for a common failure. setting
- to 0 would work just incur a huge penalty in videos that needed -1. Might be worth testing.
- */
- - if (packet.flags & PKT_FLAG_KEY)
- + if (packet.flags & AV_PKT_FLAG_KEY)
- {
- //fprintf(stderr, "Packet: (F:%d %lld %lld)\n", context->current_frame_index, packet.pts, packet.dts);
- @@ -392,8 +392,13 @@
- context->keyframe_packet_dts = context->previous_dts;
- }
- +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,23,0)
- + avcodec_decode_video2( context->codec_context, context->frame_buffer,
- + &frameFinished, &packet );
- +#else
- avcodec_decode_video(context->codec_context, context->frame_buffer, &frameFinished,
- packet.data, packet.size);
- +#endif
- if (frameFinished)
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement