Revision 393cbb96 libavcodec/utils.c

View differences:

libavcodec/utils.c
344 344
    }
345 345
    s->internal_buffer_count++;
346 346

  
347
    if(s->pkt) pic->pkt_pts= s->pkt->pts;
348
    else       pic->pkt_pts= AV_NOPTS_VALUE;
347 349
    pic->reordered_opaque= s->reordered_opaque;
348 350

  
349 351
    if(s->debug&FF_DEBUG_BUFFERS)
......
628 630
    *got_picture_ptr= 0;
629 631
    if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
630 632
        return -1;
633

  
634
    avctx->pkt = avpkt;
635

  
631 636
    if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
632 637
        ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
633 638
                                avpkt);
......
662 667
{
663 668
    int ret;
664 669

  
670
    avctx->pkt = avpkt;
671

  
665 672
    if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
666 673
        //FIXME remove the check below _after_ ensuring that all audio check that the available space is enough
667 674
        if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){
......
703 710
{
704 711
    int ret;
705 712

  
713
    avctx->pkt = avpkt;
706 714
    *got_sub_ptr = 0;
707 715
    ret = avctx->codec->decode(avctx, sub, got_sub_ptr, avpkt);
708 716
    if (*got_sub_ptr)

Also available in: Unified diff