<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<pre><b style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit;"><i>Dear experts,</i></b><br></pre>
<pre><b><i>
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).
Using ffmpeg on the 2 samples provided, I can easily decode them:
ffmpeg -f h264 -i sample.264 -s 600x400 sample_%d.jpg
ffmpeg -f mpegvideo -i sample.mpeg2 -s 600x400 sample_%d.jpg
Can you please point out the function that I should use to achieve this using libavcodec? </i></b><br></pre>
<pre><br></pre>
<pre>Also same question in <a href="http://ffmpeg.org/pipermail/libav-user/2011-April/000053.html" id="LPlnk265576">http://ffmpeg.org/pipermail/libav-user/2011-April/000053.html</a>.But links missed.Can you help me?</pre>
<pre><br></pre>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>