projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa0319b
)
avcodec: for audio encoding, reset output packet when it is not valid
author
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 21 Mar 2012 19:47:12 +0000
(15:47 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Mon, 7 May 2012 16:14:05 +0000
(12:14 -0400)
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
fdbdfd5
..
e8733c6
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-909,8
+909,11
@@
int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
avctx->frame_number++;
}
- if (ret < 0 || !*got_packet_ptr)
+ if (ret < 0 || !*got_packet_ptr)
{
av_free_packet(avpkt);
+ av_init_packet(avpkt);
+ return ret;
+ }
/* NOTE: if we add any audio encoders which output non-keyframe packets,
this needs to be moved to the encoders, but for now we can do it