History

Merge commit '4d012eb541ed7f35e00c87035a470d9f0a24a6e8'

* commit '4d012eb541ed7f35e00c87035a470d9f0a24a6e8': xwma: Fix wrong printf format expression. xwma demuxer: typos oggdec: simplify audio chained ogg streams support

Michael Niedermayer committed 15 years ago

Commit d3b379b2 parents f6302ad 4d012eb3 files · +9 −12Browse files

Unified · Split

3 files
  1. libavformat/oggdec.c +1 −7
  2. libavformat/oggdec.h +0 −1
  3. libavformat/xwma.c +8 −4
libavformat/oggdec.c+1−7
@@ -164,7 +164,6 @@ ogg_new_stream (AVFormatContext * s, uint32_t serial) · 163 unmodified lines
164164 os->bufsize = DECODER_BUFFER_SIZE;
165165 os->buf = av_malloc(os->bufsize);
166166 os->header = -1;
167− os->page_begin = 1;
168167
169168 st = av_new_stream (s, idx);
170169 if (!st)
@@ -242,8 +241,7 @@ ogg_read_page (AVFormatContext * s, int *str) · 71 unmodified lines
242241
243242 idx = ogg_find_stream (ogg, serial);
244243 if (idx < 0){
245− for (i = 0; i < ogg->nstreams; i++) {
246− if (!ogg->streams[i].page_begin) {
244+ if (ogg->headers) {
247245 int n;
248246
249247 for (n = 0; n < ogg->nstreams; n++) {
@@ -252,8 +250,6 @@ ogg_read_page (AVFormatContext * s, int *str) · 2 unmodified lines
252250 }
253251 ogg->curidx = -1;
254252 ogg->nstreams = 0;
255− break;
256− }
257253 }
258254 idx = ogg_new_stream (s, serial);
259255 if (idx < 0)
@@ -261,8 +257,6 @@ ogg_read_page (AVFormatContext * s, int *str) · 1 unmodified line
261257 }
262258
263259 os = ogg->streams + idx;
264− if (!(flags & OGG_FLAG_BOS))
265− os->page_begin = 0;
266260 os->page_pos = avio_tell(bc) - 27;
267261
268262 if(os->psize > 0)
libavformat/oggdec.h+0−1
@@ -75,7 +75,6 @@ struct ogg_stream { · 74 unmodified lines
7575 int incomplete; ///< whether we're expecting a continuation in the next page
7676 int page_end; ///< current packet is the last one completed in the page
7777 int keyframe_seek;
78− int page_begin; ///< set to 1 if the stream only received a begin-of-stream packet, otherwise 0
7978 void *private;
8079 };
8180
libavformat/xwma.c+8−4
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2020 */
2121
22+#include <inttypes.h>
23+
2224 #include "avformat.h"
2325 #include "riff.h"
2426
@@ -90,7 +92,7 @@ static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap) · 65 unmodified lines
9092 * codecs require extradata, so we provide our own fake extradata.
9193 *
9294 * First, check that there really was no extradata in the header. If
93− * there was, then try to use, after asking the the user to provide a
95+ * there was, then try to use it, after asking the user to provide a
9496 * sample of this unusual file.
9597 */
9698 if (st->codec->extradata_size != 0) {
@@ -129,7 +131,7 @@ static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap) · 32 unmodified lines
129131 /* Quoting the MSDN xWMA docs on the dpds chunk: "Contains the
130132 * decoded packet cumulative data size array, each element is the
131133 * number of bytes accumulated after the corresponding xWMA packet
132− * is decoded in order"
134+ * is decoded in order."
133135 *
134136 * Each packet has size equal to st->codec->block_align, which in
135137 * all cases I saw so far was always 2230. Thus, we can use the
@@ -144,11 +146,13 @@ static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap) · 8 unmodified lines
144146
145147 /* Compute the number of entries in the dpds chunk. */
146148 if (size & 3) { /* Size should be divisible by four */
147− av_log(s, AV_LOG_WARNING, "dpds chunk size "PRId64" not divisible by 4\n", size);
149+ av_log(s, AV_LOG_WARNING,
150+ "dpds chunk size %"PRId64" not divisible by 4\n", size);
148151 }
149152 dpds_table_size = size / 4;
150153 if (dpds_table_size == 0 || dpds_table_size >= INT_MAX / 4) {
151− av_log(s, AV_LOG_ERROR, "dpds chunk size "PRId64" invalid\n", size);
154+ av_log(s, AV_LOG_ERROR,
155+ "dpds chunk size %"PRId64" invalid\n", size);
152156 return -1;
153157 }
154158

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t