projects
/
simplay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8cc0f0
)
tmp
author
yu.dongliang
<18588496441@163.com>
Mon, 10 Apr 2023 10:44:15 +0000
(18:44 +0800)
committer
yu.dongliang
<18588496441@163.com>
Mon, 10 Apr 2023 10:44:15 +0000
(18:44 +0800)
simp_ffmpeg_output.c
patch
|
blob
|
blame
|
history
diff --git
a/simp_ffmpeg_output.c
b/simp_ffmpeg_output.c
index f21e1fe77f04bfddf58e6f4f3aa4b81819ddada8..8e3c1b2e9af8b8534dd91818aa06a6b5f1f6f450 100644
(file)
--- a/
simp_ffmpeg_output.c
+++ b/
simp_ffmpeg_output.c
@@
-51,6
+51,10
@@
static int _video_init(simp_ffmpeg_t* priv)
return ret;
}
+ priv->vframe = av_frame_alloc();
+ if (!priv->vframe)
+ return -ENOMEM;
+
priv->vpkt = av_packet_alloc();
if (!priv->vpkt)
return -ENOMEM;
@@
-176,6
+180,18
@@
error:
if (priv->afifo)
av_audio_fifo_free(priv->afifo);
+ if (priv->vframe)
+ av_frame_free(&priv->vframe);
+
+ if (priv->aframe)
+ av_frame_free(&priv->aframe);
+
+ if (priv->vpkt)
+ av_packet_free(&priv->vpkt);
+
+ if (priv->apkt)
+ av_packet_free(&priv->apkt);
+
free(priv);
return ret;
}