1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 18:25:41 +03:00
aports/testing/opencascade/fix_ffmpeg.patch
2019-10-22 22:41:30 +02:00

34 lines
1.2 KiB
Diff

In current version of ffmpeg the flag CODEC_FLAG_GLOBAL_HEADER has been renamed
and the deprecated raw picture API has been removed. This patch renames
CODEC_FLAG_GLOBAL_HEADER to AV_CODEC_FLAG_GLOBAL_HEADER and removes the use of
the dropped API.
--- occt-V7_3_0p3.bin/src/Image/Image_VideoRecorder.cxx
+++ occt-V7_3_0p3/src/Image/Image_VideoRecorder.cxx
@@ -283,7 +283,7 @@
// some formats want stream headers to be separate
if (myAVContext->oformat->flags & AVFMT_GLOBALHEADER)
{
- aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ aCodecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}
return Standard_True;
#else
@@ -456,18 +456,6 @@
AVPacket aPacket;
memset (&aPacket, 0, sizeof(aPacket));
av_init_packet (&aPacket);
- if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
- && !theToFlush)
- {
- // raw video case - directly store the picture in the packet
- aPacket.flags |= AV_PKT_FLAG_KEY;
- aPacket.stream_index = myVideoStream->index;
- aPacket.data = myFrame->data[0];
- aPacket.size = sizeof(AVPicture);
-
- aResAv = av_interleaved_write_frame (myAVContext, &aPacket);
- }
- else
{
// encode the image
myFrame->pts = myFrameCount;