~phatforge/libav/fixup

« back to all changes in this revision

Viewing changes to libavformat/ncdec.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2011-04-30 14:27:42 UTC
  • mfrom: (1.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110430142742-quvblxk1tj6adlh5
Tags: 4:0.7~b1-1ubuntu1
* Merge from debian. Remaining changes:
  - don't build against libfaad, libdirac, librtmp and libopenjpeg
    (all in universe)
  - explicitly --enable-pic on powerpc, cf. LP #654666
  - different arm configure bits that should probably better be
    merged into debian
* Cherry-picked from git: 
  - install doc/APIChanges and refer to them in NEWS.Debian (Closes: #623682)
  - don't try to install non-existing documentation, fixes FTBFS on powerpc

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * Copyright (c) 2009  Nicolas Martin (martinic at iro dot umontreal dot ca)
4
4
 *                     Edouard Auvinet
5
5
 *
6
 
 * This file is part of FFmpeg.
 
6
 * This file is part of Libav.
7
7
 *
8
 
 * FFmpeg is free software; you can redistribute it and/or
 
8
 * Libav is free software; you can redistribute it and/or
9
9
 * modify it under the terms of the GNU Lesser General Public
10
10
 * License as published by the Free Software Foundation; either
11
11
 * version 2.1 of the License, or (at your option) any later version.
12
12
 *
13
 
 * FFmpeg is distributed in the hope that it will be useful,
 
13
 * Libav is distributed in the hope that it will be useful,
14
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
16
 * Lesser General Public License for more details.
17
17
 *
18
18
 * You should have received a copy of the GNU Lesser General Public
19
 
 * License along with FFmpeg; if not, write to the Free Software
 
19
 * License along with Libav; if not, write to the Free Software
20
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
 */
22
22
 
66
66
 
67
67
    uint32_t state=-1;
68
68
    while (state != NC_VIDEO_FLAG) {
69
 
        if (url_feof(s->pb))
 
69
        if (s->pb->eof_reached)
70
70
            return AVERROR(EIO);
71
 
        state = (state<<8) + get_byte(s->pb);
 
71
        state = (state<<8) + avio_r8(s->pb);
72
72
    }
73
73
 
74
 
    get_byte(s->pb);
75
 
    size = get_le16(s->pb);
76
 
    url_fskip(s->pb, 9);
 
74
    avio_r8(s->pb);
 
75
    size = avio_rl16(s->pb);
 
76
    avio_skip(s->pb, 9);
77
77
 
78
78
    if (size == 0) {
79
79
        av_log(s, AV_LOG_DEBUG, "Next packet size is zero\n");
90
90
    return size;
91
91
}
92
92
 
93
 
AVInputFormat nc_demuxer = {
 
93
AVInputFormat ff_nc_demuxer = {
94
94
    "nc",
95
95
    NULL_IF_CONFIG_SMALL("NC camera feed format"),
96
96
    0,