~ubuntu-dev/mplayer/ubuntu-feisty

« back to all changes in this revision

Viewing changes to libmpdemux/demux_asf.c

  • Committer: William Grant
  • Date: 2007-02-03 03:16:07 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: william.grant@ubuntu.org.au-20070203031607-08gc2ompbz6spt9i
Update to 1.0rc1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
197
197
            len -= frame_end_pos;
198
198
          }
199
199
          close_seg = 1;
 
200
          if (asf->avg_vid_frame_time > 0.0 ) {
 
201
            // correct the pts for the packet
 
202
            // because dvr-ms files do not contain accurate
 
203
            // pts values but we can deduce them using
 
204
            // the average frame time
 
205
            if (asf->dvr_last_vid_pts > 0.0)
 
206
              dp->pts=asf->dvr_last_vid_pts+asf->avg_vid_frame_time;
 
207
            asf->dvr_last_vid_pts = dp->pts;
 
208
          }
200
209
        } else seq = ds->asf_seq;
201
210
      } else close_seg = ds->asf_seq!=seq;
202
211
 
487
496
//    printf("\r -- asf: newpos=%d -- \n",newpos);
488
497
    stream_seek(demuxer->stream,newpos);
489
498
 
 
499
    if (asf->asf_is_dvr_ms) asf->dvr_last_vid_pts = 0.0f;
 
500
 
490
501
    if (d_video->id >= 0)
491
502
    ds_fill_buffer(d_video);
492
503
    if(sh_audio){
493
504
      ds_fill_buffer(d_audio);
494
505
    }
495
506
    
496
 
    if (d_video->id < 0)
497
 
      sh_audio->delay = d_audio->pts;
498
 
    else
 
507
    if (d_video->id >= 0)
499
508
    while(1){
500
509
        if(sh_audio && !d_audio->eof){
501
510
          float a_pts=d_audio->pts;
558
567
            //printf("ASF: missing video stream!? contact the author, it may be a bug :(\n");
559
568
        } else {
560
569
            sh_video=demuxer->video->sh;sh_video->ds=demuxer->video;
561
 
            sh_video->fps=1000.0f; sh_video->frametime=0.001f; // 1ms
 
570
            //sh_video->fps=1000.0f; sh_video->frametime=0.001f; // 1ms  - now set when reading asf header
562
571
            //sh_video->i_bps=10*asf->packetsize; // FIXME!
563
572
        }
564
573
    }