Mercurial > libavformat.hg
annotate flacenc.h @ 5854:3dc78fb78b2a libavformat
Fix erroneous behaviour when format probe hits end of file
If the format probe hits end of file, do not add the error code
to the buffer position. This is obviously wrong, and with a
small input file would cause a negative buffer overflow.
Fixes issue 1818.
author | mru |
---|---|
date | Tue, 16 Mar 2010 21:45:30 +0000 |
parents | c52d40f0a955 |
children | 121d6994c20e |
rev | line source |
---|---|
4581
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
1 /* |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
2 * raw FLAC muxer |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
3 * Copyright (C) 2009 Justin Ruggles |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
4 * |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
5 * This file is part of FFmpeg. |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
6 * |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
7 * FFmpeg is free software; you can redistribute it and/or |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
9 * License as published by the Free Software Foundation; either |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
11 * |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
12 * FFmpeg is distributed in the hope that it will be useful, |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
15 * Lesser General Public License for more details. |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
16 * |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
18 * License along with FFmpeg; if not, write to the Free Software |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
20 */ |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
21 |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
22 #ifndef AVFORMAT_FLACENC_H |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
23 #define AVFORMAT_FLACENC_H |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
24 |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
25 #include "avformat.h" |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
26 |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
27 int ff_flac_write_header(ByteIOContext *pb, AVCodecContext *codec); |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
28 |
c52d40f0a955
Share the function to write a raw FLAC header and use it in the Matroska
jbr
parents:
diff
changeset
|
29 #endif /* AVFORMAT_FLACENC_H */ |