aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-08 14:48:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-08 15:00:36 +0100
commitb28c37156782e563341e1bccc1a15dfbc01a569f (patch)
treefc8ef8978bf3d9fd44248d3e4ec2caed36edcd3f /libavcodec
parent24e2a82f75abbe977b7ddab52a90ce4d3e57a9f8 (diff)
parent6bffa83bbeac4820f7705188e20f2e307e832fd7 (diff)
downloadffmpeg-b28c37156782e563341e1bccc1a15dfbc01a569f.tar.gz
Merge remote-tracking branch 'cigaes/master'
* cigaes/master: lavf/concatdec: reindent after last commit. lavf/concatdec: more reliable test for absolute URLs. lavf: add subfile protocol. lavfi/af_atempo: clear references before returning error. lavd/xv: take aspect ratio into account. lavc/pthread: copy packet side data. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread_frame.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index d7479d2142..4e385e7136 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -317,6 +317,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
FrameThreadContext *fctx = p->parent;
PerThreadContext *prev_thread = fctx->prev_thread;
const AVCodec *codec = p->avctx->codec;
+ int ret;
if (!avpkt->size && !(codec->capabilities & CODEC_CAP_DELAY)) return 0;
@@ -340,6 +341,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
}
}
+ av_packet_free_side_data(&p->avpkt);
av_buffer_unref(&p->avpkt.buf);
p->avpkt = *avpkt;
if (avpkt->buf)
@@ -354,6 +356,8 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
memcpy(p->buf, avpkt->data, avpkt->size);
memset(p->buf + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
}
+ if ((ret = av_copy_packet_side_data(&p->avpkt, avpkt)) < 0)
+ return ret;
p->state = STATE_SETTING_UP;
pthread_cond_signal(&p->input_cond);
@@ -592,6 +596,7 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
pthread_cond_destroy(&p->input_cond);
pthread_cond_destroy(&p->progress_cond);
pthread_cond_destroy(&p->output_cond);
+ av_packet_free_side_data(&p->avpkt);
av_buffer_unref(&p->avpkt.buf);
av_freep(&p->buf);
av_freep(&p->released_buffers);