]> git.sesse.net Git - ffmpeg/commitdiff
yuv4mpeg: do not use deprecated functions
authorLuca Barbato <lu_zero@gentoo.org>
Wed, 9 Jan 2013 19:50:06 +0000 (20:50 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 9 Jan 2013 20:07:49 +0000 (21:07 +0100)
Use the libavutil replacement.

libavformat/yuv4mpeg.c

index a8077a00f010376f11b09564d692b7071fbaa4c0..699a63a6811822acd6cdcab8c6115ab279e34059 100644 (file)
@@ -18,6 +18,8 @@
  * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
+#include "libavutil/pixdesc.h"
 #include "avformat.h"
 #include "internal.h"
 
@@ -128,8 +130,8 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
 
     if (st->codec->pix_fmt != AV_PIX_FMT_GRAY8) {
         // Adjust for smaller Cb and Cr planes
-        avcodec_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift,
-                                      &v_chroma_shift);
+        av_pix_fmt_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift,
+                                         &v_chroma_shift);
         width  >>= h_chroma_shift;
         height >>= v_chroma_shift;