[FFmpeg-devel] [PATCH 1/2] lavf/microdvd: fix muxing.

Clément Bœsch ubitux at gmail.com
Thu Feb 21 01:10:10 CET 2013


On Thu, Feb 21, 2013 at 01:00:24AM +0100, Michael Niedermayer wrote:
> On Thu, Feb 21, 2013 at 12:45:46AM +0100, Clément Bœsch wrote:
> > On Thu, Feb 21, 2013 at 12:33:25AM +0100, Michael Niedermayer wrote:
> > > On Wed, Feb 20, 2013 at 11:50:39PM +0100, Clément Bœsch wrote:
> > > > This was broken since 1f265f52.
> > > > ---
> > > >  libavformat/Makefile      |  2 +-
> > > >  libavformat/microdvdenc.c | 22 ++++++++++++++++++++--
> > > >  2 files changed, 21 insertions(+), 3 deletions(-)
> > > > 
> > > > diff --git a/libavformat/Makefile b/libavformat/Makefile
> > > > index ad70c12..0f2e5df 100644
> > > > --- a/libavformat/Makefile
> > > > +++ b/libavformat/Makefile
> > > > @@ -196,7 +196,7 @@ OBJS-$(CONFIG_MATROSKA_MUXER)            += matroskaenc.o matroska.o \
> > > >  OBJS-$(CONFIG_MD5_MUXER)                 += md5enc.o
> > > >  OBJS-$(CONFIG_MGSTS_DEMUXER)             += mgsts.o
> > > >  OBJS-$(CONFIG_MICRODVD_DEMUXER)          += microdvddec.o
> > > > -OBJS-$(CONFIG_MICRODVD_MUXER)            += microdvdenc.o rawenc.o
> > > > +OBJS-$(CONFIG_MICRODVD_MUXER)            += microdvdenc.o
> > > >  OBJS-$(CONFIG_MJPEG_DEMUXER)             += rawdec.o
> > > >  OBJS-$(CONFIG_MJPEG_MUXER)               += rawenc.o
> > > >  OBJS-$(CONFIG_MLP_DEMUXER)               += rawdec.o
> > > > diff --git a/libavformat/microdvdenc.c b/libavformat/microdvdenc.c
> > > > index ba97444..db1024e 100644
> > > > --- a/libavformat/microdvdenc.c
> > > > +++ b/libavformat/microdvdenc.c
> > > > @@ -19,8 +19,8 @@
> > > >   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > > >   */
> > > >  
> > > > +#include <inttypes.h>
> > > >  #include "avformat.h"
> > > > -#include "rawenc.h"
> > > >  
> > > >  static int microdvd_write_header(struct AVFormatContext *s)
> > > >  {
> > > > @@ -39,13 +39,31 @@ static int microdvd_write_header(struct AVFormatContext *s)
> > > >      return 0;
> > > >  }
> > > >  
> > > > +static int microdvd_write_packet(AVFormatContext *avf, AVPacket *pkt)
> > > > +{
> > > > +    AVRational tb  = avf->streams[0]->time_base;
> > > > +    AVRational tbc = avf->streams[0]->codec->time_base;
> > > > +
> > > > +    avio_printf(avf->pb, "{%"PRId64"}", av_rescale_q(pkt->pts, tb, tbc));
> > > 
> > > a set_pts_info() in write_header() should avoid the rescale unless i
> > > misunderstand the intent
> > > 
> > 
> > I didn't know you could do that. That simplifies things indeed, thanks.
> > New patch attached.
> > 
> > -- 
> > Clément B.
> 
> >  Makefile      |    2 +-
> >  microdvdenc.c |   21 +++++++++++++++++++--
> >  2 files changed, 20 insertions(+), 3 deletions(-)
> > 386c60e9ae64a1e9968dfcda4c42edcbd43da303  0001-lavf-microdvd-fix-muxing.patch
> > From 342ef0f79f872b5208090a317ae05e9968ff7e9f Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux at gmail.com>
> > Date: Wed, 20 Feb 2013 23:43:25 +0100
> > Subject: [PATCH 1/2] lavf/microdvd: fix muxing.
> > 
> > This was broken since 1f265f52.
> 
> LGTM
> 

Applied, thanks.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130221/626589f0/attachment.asc>


More information about the ffmpeg-devel mailing list