Revision 5150dd53

View differences:

libavformat/matroskaenc.c
83 83
    mkv_cues        *cues;
84 84
    mkv_track       *tracks;
85 85

  
86
    AVLFG           lfg;
87 86
    unsigned int    audio_buffer_size;
88 87
    AVPacket        cur_audio_pkt;
89 88
} MatroskaMuxContext;
......
699 698
    if (!strcmp(s->oformat->name, "webm")) mkv->mode = MODE_WEBM;
700 699
    else                                   mkv->mode = MODE_MATROSKAv2;
701 700

  
702
    av_lfg_init(&mkv->lfg, av_get_random_seed());
703

  
704 701
    mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks));
705 702
    if (!mkv->tracks)
706 703
        return AVERROR(ENOMEM);
......
736 733
        put_ebml_string(pb, MATROSKA_ID_TITLE, tag->value);
737 734
    if (!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT)) {
738 735
        uint32_t segment_uid[4];
736
        AVLFG lfg;
737

  
738
        av_lfg_init(&lfg, av_get_random_seed());
739

  
739 740
        for (i = 0; i < 4; i++)
740
            segment_uid[i] = av_lfg_get(&mkv->lfg);
741
            segment_uid[i] = av_lfg_get(&lfg);
741 742

  
742 743
        put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , LIBAVFORMAT_IDENT);
743 744
        put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);

Also available in: Unified diff