Ticket #675: patch

File patch, 977 bytes (added by i_s_c_y@…, 12 years ago)

patch

  • libavformat/avformat.h

     
    402402void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
    403403
    404404void av_register_all(void);
     405void av_register_all_protocols(void);
    405406
    406407/* media file input */
    407408AVInputFormat *av_find_input_format(const char *short_name);
  • libavformat/allformats.c

     
    168168    REGISTER_DEMUXER (WV, wv);
    169169    REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
    170170
     171    av_register_all_protocols();
     172}
     173
     174void av_register_all_protocols(void)
     175{
     176    static int inited = 0;
     177
     178    if (inited != 0)
     179        return;
     180    inited = 1;
     181
    171182#ifdef CONFIG_PROTOCOLS
    172183    /* file protocols */
    173184    register_protocol(&file_protocol);