Contents of /trunk/gpac/patches/gpac-0.7.1-ffmpeg-4.0.patch
Parent Directory | Revision Log
Revision 3146 -
(show annotations)
(download)
Thu Jun 28 13:08:06 2018 UTC (5 years, 11 months ago) by niro
File size: 1952 byte(s)
Thu Jun 28 13:08:06 2018 UTC (5 years, 11 months ago) by niro
File size: 1952 byte(s)
-added fix for ffmpeg-4.0
1 | diff -rupN gpac-0.7.1.orig/applications/dashcast/video_encoder.c gpac-0.7.1/applications/dashcast/video_encoder.c |
2 | --- gpac-0.7.1.orig/applications/dashcast/video_encoder.c 2018-04-26 09:19:52.938118328 +0200 |
3 | +++ gpac-0.7.1/applications/dashcast/video_encoder.c 2018-04-26 09:20:03.165170164 +0200 |
4 | @@ -144,7 +144,7 @@ int dc_video_encoder_open(VideoOutputFil |
5 | } |
6 | |
7 | //the global header gives access to the extradata (SPS/PPS) |
8 | - video_output_file->codec_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER; |
9 | + video_output_file->codec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; |
10 | |
11 | video_output_file->vstream_idx = 0;//video_stream->index; |
12 | |
13 | diff -rupN gpac-0.7.1.orig/modules/ffmpeg_in/ffmpeg_decode.c gpac-0.7.1/modules/ffmpeg_in/ffmpeg_decode.c |
14 | --- gpac-0.7.1.orig/modules/ffmpeg_in/ffmpeg_decode.c 2018-04-26 09:19:53.034788555 +0200 |
15 | +++ gpac-0.7.1/modules/ffmpeg_in/ffmpeg_decode.c 2018-04-26 09:30:09.739463486 +0200 |
16 | @@ -49,7 +49,7 @@ |
17 | static uint8_t * ffmpeg_realloc_buffer(uint8_t * oldBuffer, u32 size) { |
18 | uint8_t * buffer; |
19 | /* Size of buffer must be larger, see avcodec_decode_video2 documentation */ |
20 | - u32 allocatedSz = sizeof( char ) * (FF_INPUT_BUFFER_PADDING_SIZE + size); |
21 | + u32 allocatedSz = sizeof( char ) * (AV_INPUT_BUFFER_PADDING_SIZE + size); |
22 | if (oldBuffer) |
23 | gf_free(oldBuffer); |
24 | buffer = (uint8_t*)gf_malloc( allocatedSz ); |
25 | @@ -577,7 +577,7 @@ static GF_Err FFDEC_GetCapabilities(GF_B |
26 | capability->cap.valueInt = 1; |
27 | return GF_OK; |
28 | case GF_CODEC_PADDING_BYTES: |
29 | - capability->cap.valueInt = FF_INPUT_BUFFER_PADDING_SIZE; |
30 | + capability->cap.valueInt = AV_INPUT_BUFFER_PADDING_SIZE; |
31 | return GF_OK; |
32 | case GF_CODEC_REORDER: |
33 | capability->cap.valueInt = 1; |
34 | @@ -669,7 +669,7 @@ static GF_Err FFDEC_GetCapabilities(GF_B |
35 | break; |
36 | |
37 | case GF_CODEC_PADDING_BYTES: |
38 | - capability->cap.valueInt = FF_INPUT_BUFFER_PADDING_SIZE; |
39 | + capability->cap.valueInt = AV_INPUT_BUFFER_PADDING_SIZE; |
40 | break; |
41 | default: |
42 | capability->cap.valueInt = 0; |