[Ffmpeg-devel] [patch 0/3] Tiny fixes
lists at kenneth.aafloy.net
lists
Sun Jun 5 01:06:05 CEST 2005
Here is a set of three patches that fixes some minor quirks that I have
encountered while using the libavformat/codec combo.
The first patch fixes what is clearly a typo.
The second enables the already existing aspect ratio code,
that enables users to reach the current aspect ratio of
the stream.
The third fixes a int vs. offset_t with offset_t > int.
Patches was generated against an older version of CVS,
if that is a problem, I'll resend.
Kenneth
--
>From lists at kenneth.aafloy.net Sun Jun 5 01:12:07 2005
Message-Id: <20050604231207.168904000 at localhost>
References: <20050604230605.718269000 at localhost>
Date: Sun, 05 Jun 2005 01:06:06 +0200
From: lists at kenneth.aafloy.net
To: ffmpeg-devel at mplayerhq.hu
Subject: [patch 1/3] Fix duration calculation
Content-Disposition: inline; filename=avformat_duration_fix.patch
Fix duration calculation if end time is not given.
Index: 3rdparty/libavformat/utils.c
===================================================================
--- 3rdparty.orig/libavformat/utils.c 2005-05-23 18:34:56.000000000 +0200
+++ 3rdparty/libavformat/utils.c 2005-05-23 18:35:08.000000000 +0200
@@ -1445,7 +1445,7 @@
}
if (start_time != MAXINT64) {
ic->start_time = start_time;
- if (end_time != MAXINT64) {
+ if (end_time != MININT64) {
ic->duration = end_time - start_time;
if (ic->file_size > 0) {
/* compute the bit rate */
--
>From lists at kenneth.aafloy.net Sun Jun 5 01:12:07 2005
Message-Id: <20050604231207.307306000 at localhost>
References: <20050604230605.718269000 at localhost>
Date: Sun, 05 Jun 2005 01:06:07 +0200
From: lists at kenneth.aafloy.net
To: ffmpeg-devel at mplayerhq.hu
Subject: [patch 2/3] Enable mpeg aspect ratio changes
Content-Disposition: inline; filename=enable_mpeg12_aspect_change.patch
Enable mpeg aspect ratio changes mid stream.
Index: 3rdparty/libavcodec/mpeg12.c
===================================================================
--- 3rdparty.orig/libavcodec/mpeg12.c 2005-05-23 18:38:27.000000000 +0200
+++ 3rdparty/libavcodec/mpeg12.c 2005-05-23 18:38:52.000000000 +0200
@@ -2078,7 +2078,7 @@
(s1->mpeg_enc_ctx_allocated == 0)||
avctx->coded_width != s->width ||
avctx->coded_height != s->height||
-// s1->save_aspect_info != avctx->aspect_ratio_info||
+ s1->save_aspect_info != s->aspect_ratio_info||
0)
{
--
>From lists at kenneth.aafloy.net Sun Jun 5 01:12:07 2005
Message-Id: <20050604231207.463864000 at localhost>
References: <20050604230605.718269000 at localhost>
Date: Sun, 05 Jun 2005 01:06:08 +0200
From: lists at kenneth.aafloy.net
To: ffmpeg-devel at mplayerhq.hu
Subject: [patch 3/3] Fix ByteIOContext int vs offset_t in seek
Content-Disposition: inline; filename=avformat_seek_wrap.patch
Fix seeking with ByteIOContext
Index: 3rdparty/libavformat/avio.h
===================================================================
--- 3rdparty.orig/libavformat/avio.h 2005-05-23 18:41:21.000000000 +0200
+++ 3rdparty/libavformat/avio.h 2005-05-23 18:41:51.000000000 +0200
@@ -71,7 +71,7 @@
void *opaque;
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
- int (*seek)(void *opaque, offset_t offset, int whence);
+ offset_t (*seek)(void *opaque, offset_t offset, int whence);
offset_t pos; /* position in the file of the current buffer */
int must_flush; /* true if the next seek should flush */
int eof_reached; /* true if eof reached */
Index: 3rdparty/libavformat/aviobuf.c
===================================================================
--- 3rdparty.orig/libavformat/aviobuf.c 2005-06-05 01:02:47.000000000 +0200
+++ 3rdparty/libavformat/aviobuf.c 2005-06-05 01:03:21.000000000 +0200
@@ -29,7 +29,7 @@
void *opaque,
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
- int (*seek)(void *opaque, offset_t offset, int whence))
+ offset_t (*seek)(void *opaque, offset_t offset, int whence))
{
s->buffer = buffer;
s->buffer_size = buffer_size;
@@ -491,7 +491,7 @@
return url_read(h, buf, buf_size);
}
-static int url_seek_packet(void *opaque, int64_t offset, int whence)
+static offset_t url_seek_packet(void *opaque, int64_t offset, int whence)
{
URLContext *h = opaque;
return url_seek(h, offset, whence);
--
More information about the ffmpeg-devel
mailing list