AV on TRVMFFMPEG.InitDecode

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
panlab_mf
Posts: 35
Joined: Wed Feb 06, 2019 9:55 am

AV on TRVMFFMPEG.InitDecode

Post by panlab_mf »

Hi,

I'm getting AV on TRVMFFMPEG.InitDecode(), if the OpenFile returns false.

Code: Select all

    try
      // Open video file
      if not OpenFile(FormatContext, DecCurTime, filename) then
      begin
        try
          av_free(FormatContext);
        finally
          FormatContext := nil;
        end;
        exit;
      end;
    except
      exit;
    end;
How can I silence this exception in order to continue running my application?

Thanks,
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: AV on TRVMFFMPEG.InitDecode

Post by Sergey Tkachenko »

This is a bug. This code must be:

Code: Select all

    try
      // Open video file
      if not OpenFile(FormatContext, DecCurTime, filename) then
      begin
          FormatContext := nil;
          exit;
      end;
    except
      exit;
    end;
panlab_mf
Posts: 35
Joined: Wed Feb 06, 2019 9:55 am

Re: AV on TRVMFFMPEG.InitDecode

Post by panlab_mf »

Nice.
Post Reply