Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding condition before calling av_frame_free (in AV_FREE_FRAME macro) #184

Merged
merged 1 commit into from
Jan 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/FFmpegUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
#define AV_ALLOCATE_FRAME() av_frame_alloc()
#define AV_ALLOCATE_IMAGE(av_frame, pix_fmt, width, height) av_image_alloc(av_frame->data, av_frame->linesize, width, height, pix_fmt, 1)
#define AV_RESET_FRAME(av_frame) av_frame_unref(av_frame)
#define AV_FREE_FRAME(av_frame) av_frame_free(av_frame)
#define AV_FREE_FRAME(av_frame) if (av_frame) av_frame_free(av_frame)
#define AV_FREE_PACKET(av_packet) av_packet_unref(av_packet)
#define AV_FREE_CONTEXT(av_context) avcodec_free_context(&av_context)
#define AV_GET_CODEC_TYPE(av_stream) av_stream->codecpar->codec_type
Expand Down Expand Up @@ -176,7 +176,7 @@
#define AV_ALLOCATE_FRAME() av_frame_alloc()
#define AV_ALLOCATE_IMAGE(av_frame, pix_fmt, width, height) av_image_alloc(av_frame->data, av_frame->linesize, width, height, pix_fmt, 1)
#define AV_RESET_FRAME(av_frame) av_frame_unref(av_frame)
#define AV_FREE_FRAME(av_frame) av_frame_free(av_frame)
#define AV_FREE_FRAME(av_frame) if(av_frame) av_frame_free(av_frame)
#define AV_FREE_PACKET(av_packet) av_packet_unref(av_packet)
#define AV_FREE_CONTEXT(av_context) avcodec_free_context(&av_context)
#define AV_GET_CODEC_TYPE(av_stream) av_stream->codecpar->codec_type
Expand Down Expand Up @@ -211,7 +211,7 @@
#define AV_ALLOCATE_FRAME() av_frame_alloc()
#define AV_ALLOCATE_IMAGE(av_frame, pix_fmt, width, height) avpicture_alloc((AVPicture *) av_frame, pix_fmt, width, height)
#define AV_RESET_FRAME(av_frame) av_frame_unref(av_frame)
#define AV_FREE_FRAME(av_frame) av_frame_free(av_frame)
#define AV_FREE_FRAME(av_frame) if (av_frame) av_frame_free(av_frame)
#define AV_FREE_PACKET(av_packet) av_packet_unref(av_packet)
#define AV_FREE_CONTEXT(av_context) avcodec_close(av_context)
#define AV_GET_CODEC_TYPE(av_stream) av_stream->codec->codec_type
Expand Down Expand Up @@ -241,7 +241,7 @@
#define AV_ALLOCATE_FRAME() avcodec_alloc_frame()
#define AV_ALLOCATE_IMAGE(av_frame, pix_fmt, width, height) avpicture_alloc((AVPicture *) av_frame, pix_fmt, width, height)
#define AV_RESET_FRAME(av_frame) avcodec_get_frame_defaults(av_frame)
#define AV_FREE_FRAME(av_frame) avcodec_free_frame(av_frame)
#define AV_FREE_FRAME(av_frame) if(av_frame) avcodec_free_frame(av_frame)
#define AV_FREE_PACKET(av_packet) av_free_packet(av_packet)
#define AV_FREE_CONTEXT(av_context) avcodec_close(av_context)
#define AV_GET_CODEC_TYPE(av_stream) av_stream->codec->codec_type
Expand Down