[FFmpeg-devel] [PATCH 1/2] lavf/microdvd: fix muxing.
Michael Niedermayer
michaelni at gmx.at
Thu Feb 21 00:33:25 CET 2013
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130221/1e4e1652/attachment.asc>
More information about the ffmpeg-devel
mailing list