Merge commit '90cfc084e3
'
* commit '90cfc084e3
':
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:
commit
a646ac8ef5
2 changed files with 16 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue