changeset 1402:f662e9c86cf2 libavcodec

* fixing a regression in mpeg encoder (not setting pix_fmt), this is hardly the right way to do things, but it'll suffice for now. * patch from Gildas Bazin gbazin at altern dot org * fix for a 10l in configure * gcc 2.95.3 and Solaris build in general are not ready for -Werror in libavformat/Makefile
author romansh
date Tue, 12 Aug 2003 18:20:29 +0000
parents f5a107782a66
children bd42cc06ceb7
files avcodec.h mpeg12.c mpegvideo.c
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Tue Aug 12 10:00:31 2003 +0000
+++ b/avcodec.h	Tue Aug 12 18:20:29 2003 +0000
@@ -455,7 +455,10 @@
 
     /**
      * pixel format, see PIX_FMT_xxx.
-     * - encoding: unused
+     * - encoding: FIXME: used by ffmpeg to decide whether an pix_fmt
+     *                    conversion is in order. This only works for
+     *                    codecs with one supported pix_fmt, we should
+     *                    do something for a generic case as well.
      * - decoding: set by lavc.
      */
     enum PixelFormat pix_fmt;
--- a/mpeg12.c	Tue Aug 12 10:00:31 2003 +0000
+++ b/mpeg12.c	Tue Aug 12 18:20:29 2003 +0000
@@ -2035,7 +2035,7 @@
     Mpeg1Context *s1 = avctx->priv_data;
     MpegEncContext *s = &s1->mpeg_enc_ctx;
        
-    if (!s1->mpeg_enc_ctx_allocated)
+    if (!s1->mpeg_enc_ctx_allocated || !s->current_picture_ptr)
         return 0;
 
 #ifdef HAVE_XVMC
--- a/mpegvideo.c	Tue Aug 12 10:00:31 2003 +0000
+++ b/mpegvideo.c	Tue Aug 12 18:20:29 2003 +0000
@@ -540,6 +540,8 @@
     int i;
     int chroma_h_shift, chroma_v_shift;
 
+    avctx->pix_fmt = PIX_FMT_YUV420P; // FIXME
+
     s->bit_rate = avctx->bit_rate;
     s->bit_rate_tolerance = avctx->bit_rate_tolerance;
     s->width = avctx->width;
@@ -1515,6 +1517,7 @@
             pic->quality   = s->reordered_input_picture[0]->quality;
             pic->coded_picture_number = s->reordered_input_picture[0]->coded_picture_number;
             pic->reference = s->reordered_input_picture[0]->reference;
+	    pic->pts = s->reordered_input_picture[0]->pts;
             
             alloc_picture(s, pic, 0);