Skip to content

Commit

Permalink
Fix deprecated warnings into properties classes
Browse files Browse the repository at this point in the history
  • Loading branch information
valnoel committed Feb 12, 2020
1 parent da05a71 commit fb86d8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/AvTranscoder/properties/DataProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void DataProperties::detectAncillaryData()
detection = true;
}

av_free_packet(&pkt);
av_packet_unref(&pkt);

if(detection)
break;
Expand Down
4 changes: 2 additions & 2 deletions src/AvTranscoder/properties/PixelProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ size_t PixelProperties::getMaxNbBitsInChannels() const
size_t maxNbBitsInChannels = 0;
for(unsigned int channelIndex = 0; channelIndex < _pixelDesc->nb_components; ++channelIndex)
{
const size_t nbBits = _pixelDesc->comp[channelIndex].depth_minus1 + 1;
const size_t nbBits = _pixelDesc->comp[channelIndex].depth;
if(nbBits > maxNbBitsInChannels)
maxNbBitsInChannels = nbBits;
}
Expand Down Expand Up @@ -227,7 +227,7 @@ std::vector<Channel> PixelProperties::getChannels() const
Channel c;
c.id = channel;
c.chromaHeight = (size_t)_pixelDesc->comp[channel].plane;
c.bitStep = (size_t)_pixelDesc->comp[channel].step_minus1;
c.bitStep = (size_t)_pixelDesc->comp[channel].step - 1;
channels.push_back(c);
}
return channels;
Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/properties/VideoProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ size_t VideoProperties::analyseGopStructure(IProgress& progress)
AVFrame& avFrame = frame.getAVFrame();

_gopStructure.push_back(
std::make_pair(av_get_picture_type_char(avFrame.pict_type), av_frame_get_pkt_size(&avFrame)));
std::make_pair(av_get_picture_type_char(avFrame.pict_type), avFrame.pkt_size));
_isInterlaced = avFrame.interlaced_frame;
_isTopFieldFirst = avFrame.top_field_first;
if(avFrame.pict_type == AV_PICTURE_TYPE_I)
Expand Down

0 comments on commit fb86d8d

Please sign in to comment.