Revision 54e5cf13 libavformat/ffmenc.c

View differences:

libavformat/ffmenc.c
47 47

  
48 48
    /* prepare next packet */
49 49
    ffm->frame_offset = 0; /* no key frame */
50
    ffm->pts = 0; /* no pts */
51 50
    ffm->packet_ptr = ffm->packet;
52 51
    ffm->first_packet = 0;
53 52
}
......
60 59
    FFMContext *ffm = s->priv_data;
61 60
    int len;
62 61

  
63
    if (header && ffm->frame_offset == 0)
62
    if (header && ffm->frame_offset == 0) {
64 63
        ffm->frame_offset = ffm->packet_ptr - ffm->packet + FFM_HEADER_SIZE;
65
    if (header && ffm->pts == 0)
66 64
        ffm->pts = pts;
65
    }
67 66

  
68 67
    /* write as many packets as needed */
69 68
    while (size > 0) {

Also available in: Unified diff