File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,13 @@ Frame::Frame( const size_t dataSize )
15
15
16
16
Frame::Frame (AVPacket& avPacket)
17
17
{
18
+ #if LIBAVCODEC_VERSION_MAJOR > 54 || ( LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR > 56 )
18
19
av_copy_packet ( &_packet, &avPacket );
20
+ #else
21
+ // we just care about data, not side properties of AVPacket
22
+ initAVPacket ();
23
+ copyData ( avPacket.data , avPacket.size );
24
+ #endif
19
25
}
20
26
21
27
Frame::~Frame ()
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class AvExport Frame
19
19
// / Create a frame with a the given buffer size
20
20
Frame ( const size_t dataSize );
21
21
22
- // / Create a frame from the given AVPAcket (copy data)
22
+ // / Create a frame from the given AVPAcket (copy data of given packet )
23
23
Frame ( AVPacket& avPacket );
24
24
25
25
// / Free buffer of data
You can’t perform that action at this time.
0 commit comments