<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>


<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>


<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>



<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>

Dear experts,<br><br>I need to decode (and export as jpg) H.264 and MPEG-2 I-pictures from within the source code of an application I'm writing in C. I linked against libavcodec in the hope that avcodec_decode_video() could do it but it seems that it only works for .mpg and not for raw elementary streams. I basically used the code from libavcodec's old apiexample.c (no AVPacket).<br><br>Using ffmpeg on the 2 samples provided, I can easily decode them:<br>ffmpeg -f h264 -i sample.264 -s 600x400 sample_%d.jpg<br>ffmpeg -f mpegvideo -i sample.mpeg2 -s 600x400 sample_%d.jpg<br><br>Can you please point out the function that I should use to achieve this using libavcodec? <br><br>Thanks.<br><br>Best regards,<br><br>Rob.<br><br>------<br>H.264 sample:<br><a href="http://www.megaupload.com/?d=0JWNOLBF">http://www.megaupload.com/?d=0JWNOLBF</a><br><br>MPEG-2 sample:<br><a href="http://www.megaupload.com/?d=IRMGS27B">http://www.megaupload.com/?d=IRMGS27B</a>                                       </body>
</html>