diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 4c850f551c7e1da4402cbebc9a1c707dbf7cb543..d790b881fb0838afc379196b8b7dab67bc784621 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -150,6 +150,7 @@ static int raw_decode(AVCodecContext *avctx,
     frame->reordered_opaque = avctx->reordered_opaque;
     frame->pkt_pts          = avctx->pkt->pts;
     frame->pkt_pos          = avctx->pkt->pos;
+    frame->pkt_duration     = avctx->pkt->duration;
 
     if(context->tff>=0){
         frame->interlaced_frame = 1;