Merge commit '90cfc084e3e6d37ab88fc96a95f0401d8e8b4cd1'
* commit '90cfc084e3e6d37ab88fc96a95f0401d8e8b4cd1': avpacket: free side data in av_free_packet(). v4l2: do not assert on a value received from outside of Libav v4l2: set the average framerate instead of codec timebase. Conflicts: libavcodec/avpacket.c libavdevice/v4l2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -41,8 +41,6 @@ void av_destruct_packet(AVPacket *pkt)
|
||||
av_free(pkt->data);
|
||||
pkt->data = NULL;
|
||||
pkt->size = 0;
|
||||
|
||||
ff_packet_free_side_data(pkt);
|
||||
}
|
||||
|
||||
void av_init_packet(AVPacket *pkt)
|
||||
@@ -174,11 +172,16 @@ int av_copy_packet(AVPacket *dst, AVPacket *src)
|
||||
void av_free_packet(AVPacket *pkt)
|
||||
{
|
||||
if (pkt) {
|
||||
int i;
|
||||
|
||||
if (pkt->destruct)
|
||||
pkt->destruct(pkt);
|
||||
pkt->data = NULL;
|
||||
pkt->size = 0;
|
||||
pkt->side_data = NULL;
|
||||
|
||||
for (i = 0; i < pkt->side_data_elems; i++)
|
||||
av_free(pkt->side_data[i].data);
|
||||
av_freep(&pkt->side_data);
|
||||
pkt->side_data_elems = 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user