<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16434"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=834325305-23092011><FONT color=#005080 
face="Trebuchet MS">Hi Matt,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834325305-23092011><FONT color=#005080 
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834325305-23092011><FONT color=#005080 
face="Trebuchet MS">Thanks for your response.  Yes I did call 
av_register_all();.  I also used my C extern braces around 
<avcodec.h> and <avformat.h>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834325305-23092011><FONT color=#005080 
size=2 face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834325305-23092011><FONT color=#005080 
size=2 face="Trebuchet MS">What does avcodec_register_all() do?  Should 
this be called as well?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834325305-23092011><FONT color=#005080 
size=2 face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834325305-23092011><FONT color=#005080 
size=2 face="Trebuchet MS">Your assistance is appreciated.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial></FONT> </DIV>
<DIV> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> libav-user-bounces@ffmpeg.org 
[mailto:libav-user-bounces@ffmpeg.org] <B>On Behalf Of </B>Matthew 
Einhorn<BR><B>Sent:</B> 22 September 2011 10:01 PM<BR><B>To:</B> This list is 
about using libavcodec, libavformat, libavutil,libavdevice and 
libavfilter.<BR><B>Subject:</B> Re: [Libav-user] Invalid Handle was specified - 
av_guess_format /avformat_alloc_context<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=gmail_quote>On Thu, Sep 22, 2011 at 10:13 AM, Marlon Reid <SPAN 
dir=ltr><<A 
href="mailto:Marlon@scansoft.co.za">Marlon@scansoft.co.za</A>></SPAN> 
wrote:<BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
class=gmail_quote><U></U>
  <DIV 
  style="BACKGROUND-COLOR: #e0e0e0; FONT-FAMILY: Arial; COLOR: #000000; FONT-SIZE: 10pt" 
  bgcolor="#e0e0e0">
  <DIV>
  <DIV><SPAN lang=EN-ZA><FONT color=#005080 size=3 
  face="Trebuchet MS"><SPAN>Hi,</SPAN></FONT></SPAN></DIV>
  <DIV><SPAN lang=EN-ZA><FONT color=#005080 size=3 
  face="Trebuchet MS"><SPAN></SPAN></FONT></SPAN></DIV>
  <DIV><SPAN lang=EN-ZA><FONT color=#005080><SPAN><FONT 
  face="Trebuchet MS"><FONT size=3>I am experiencing problems with using 
  av_guess_format / avformat_alloc_context. In my sample code below, my 
  application crashes on "<FONT color=#000000><SPAN>m_Out</SPAN>fmt = 
  av_guess_format ( "mp3"</FONT></FONT></FONT><FONT color=#000000><FONT size=3 
  face="Trebuchet MS">, NULL, NULL);"<SPAN> with the message "Unhandled 
  exception at 0x773b2865 in test.exe: 0xC0000008: An invalid handle was 
  specified."</SPAN> .</FONT></FONT></SPAN></FONT></SPAN></DIV></DIV></DIV></BLOCKQUOTE>
<DIV><BR>Have you called av register all before doing anything? Did you put the 
include files declaration in extern C 
braces?<BR><BR>Matt<BR></DIV></DIV></BODY></HTML>