~ubuntu-dev/mplayer/ubuntu-feisty

« back to all changes in this revision

Viewing changes to libavformat/ffm.c

  • Committer: Reinhard Tartler
  • Date: 2006-07-08 08:47:54 UTC
  • Revision ID: siretart@tauware.de-20060708084754-c3ff228cc9c2d8de
upgrade to pre8

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
    /* read and write */
46
46
    int first_packet; /* true if first packet, needed to set the discontinuity tag */
 
47
    int first_frame_in_packet; /* true if first frame in packet, needed to know if PTS information is valid */
47
48
    int packet_size;
48
49
    int frame_offset;
49
50
    int64_t pts;
347
348
            get_be16(pb); /* PACKET_ID */
348
349
            fill_size = get_be16(pb);
349
350
            ffm->pts = get_be64(pb);
 
351
            ffm->first_frame_in_packet = 1;
350
352
            frame_offset = get_be16(pb);
351
353
            get_buffer(pb, ffm->packet, ffm->packet_size - FFM_HEADER_SIZE);
352
354
            ffm->packet_end = ffm->packet + (ffm->packet_size - FFM_HEADER_SIZE - fill_size);
614
616
            av_free_packet(pkt);
615
617
            return -EAGAIN;
616
618
        }
617
 
        pkt->pts = ffm->pts;
 
619
        if (ffm->first_frame_in_packet)
 
620
        {
 
621
            pkt->pts = ffm->pts;
 
622
            ffm->first_frame_in_packet = 0;
 
623
        }
618
624
        pkt->duration = duration;
619
625
        break;
620
626
    }
700
706
    return 0;
701
707
}
702
708
 
 
709
#ifdef CONFIG_FFSERVER
703
710
offset_t ffm_read_write_index(int fd)
704
711
{
705
712
    uint8_t buf[8];
731
738
    ffm->write_index = pos;
732
739
    ffm->file_size = file_size;
733
740
}
 
741
#endif // CONFIG_FFSERVER
734
742
 
735
743
static int ffm_read_close(AVFormatContext *s)
736
744
{