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:
5891fd0
)
libtwolame: prevent a NULL pointer dereference
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Fri, 21 Nov 2014 11:56:59 +0000
(11:56 +0000)
committer
Luca Barbato
<lu_zero@gentoo.org>
Mon, 12 Jan 2015 23:16:40 +0000
(
00:16
+0100)
CC: libav-stable@libav.org
Bug-Id: CID
1250330
/ CID
1250335
(cherry picked from commit
a42d5c861fea8d18d997c6ba3f4a1d8aa95a288b
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/libtwolame.c
patch
|
blob
|
history
diff --git
a/libavcodec/libtwolame.c
b/libavcodec/libtwolame.c
index def5feeb9dd688d08e18467433aed9bfb27966d2..7f7b2f7590943e36a2813c32d73ebf693626830a 100644
(file)
--- a/
libavcodec/libtwolame.c
+++ b/
libavcodec/libtwolame.c
@@
-148,8
+148,8
@@
static int twolame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
if (ret < 0) // twolame error
return AVERROR_UNKNOWN;
- avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
if (frame) {
+ avpkt->duration = ff_samples_to_time_base(avctx, frame->nb_samples);
if (frame->pts != AV_NOPTS_VALUE)
avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->delay);
} else {