[FFmpeg-trac] #935(undetermined:new): mov: error opening alias, while file exists

FFmpeg trac at avcodec.org
Mon Jan 23 03:42:24 CET 2012


#935: mov: error opening alias, while file exists
-------------------------------------+-------------------------------------
             Reporter:  zhukov       |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by zhukov):

 how can it be circumvented?
 the following patch helped me
 {{{

 diff --git a/libavformat/mov.c b/libavformat/mov.c
 index 3bb42fe..a58aa6f 100644
 --- a/libavformat/mov.c
 +++ b/libavformat/mov.c
 @@ -1933,6 +1933,8 @@ static void mov_build_index(MOVContext *mov,
 AVStream *st)
  static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref,
                           AVIOInterruptCB *int_cb)
  {
 +    int i_know_what_i_am_doing_flag = 1; //TODO: get it from command-line
 or somewhere else
 +
      /* try relative path, we do not try the absolute because it can leak
 information about our
         system to an attacker */
      if (ref->nlvl_to > 0 && ref->nlvl_from > 0) {
 @@ -1969,6 +1971,10 @@ static int mov_open_dref(AVIOContext **pb, const
 char *src, MOVDref *ref,
              if (!avio_open2(pb, filename, AVIO_FLAG_READ, int_cb, NULL))
                  return 0;
          }
 +    } else if (i_know_what_i_am_doing_flag) {
 +        //if user explicitly asks for absolute paths - try opening
 +        if (!avio_open2(pb, ref->path, AVIO_FLAG_READ, int_cb, NULL))
 +            return 0;
      }

      return AVERROR(ENOENT);
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/935#comment:6>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list