You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
425 B

#include <stdio.h>
#include "MediaAVPacket.h"
MediaAVPacket::MediaAVPacket()
{
m_pakcet = (AVPacket*)av_malloc(sizeof(AVPacket));
if (m_pakcet == nullptr)
{
printf("av_packet_alloc error\n");
}
}
MediaAVPacket::~MediaAVPacket()
{
if (!m_pakcet)
{
return;
}
av_packet_unref(m_pakcet);
av_freep(m_pakcet);
av_packet_free(&m_pakcet);
// printf("av_packet_free\n");
}