~siretart/ubuntu/utopic/libav/libav10

« back to all changes in this revision

Viewing changes to libavformat/avidec.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-02-05 00:24:42 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20140205002442-096i8r14aeqnlyxd
Tags: 6:9.11-1
* Imported Upstream version 9.11
  - drop patch mathematics-remove-asserts-from-av_rescale_rnd.patch,
    merged upstream
  - mathematics: remove asserts from av_rescale_rnd, (Closes: #718805)
* Support Opus in Ogg containers (Closes: #733884, 720563)
* Refactor conffile moving
* No longer build-depend on libtiff4-dev. Closes: #736020
* Disable opencv filter because of #737584
* Check upstream OpenPGP signatures (Closes: #723692)

Show diffs side-by-side

added added

removed removed

Lines of Context:
456
456
                ast = s->streams[0]->priv_data;
457
457
                av_freep(&s->streams[0]->codec->extradata);
458
458
                av_freep(&s->streams[0]->codec);
 
459
                av_freep(&s->streams[0]->info);
459
460
                av_freep(&s->streams[0]);
460
461
                s->nb_streams = 0;
461
462
                if (CONFIG_DV_DEMUXER) {
462
463
                    avi->dv_demux = avpriv_dv_init_demux(s);
463
464
                    if (!avi->dv_demux)
464
465
                        goto fail;
465
 
                }
 
466
                } else
 
467
                    goto fail;
466
468
                s->streams[0]->priv_data = ast;
467
469
                avio_skip(pb, 3 * 4);
468
470
                ast->scale = avio_rl32(pb);
885
887
            goto start_sync;
886
888
        }
887
889
 
888
 
        n= get_stream_idx(d);
 
890
        n = avi->dv_demux ? 0 : get_stream_idx(d);
889
891
 
890
892
        if(!((i-avi->last_pkt_pos)&1) && get_stream_idx(d+1) < s->nb_streams)
891
893
            continue;
988
990
        int size = avpriv_dv_get_packet(avi->dv_demux, pkt);
989
991
        if (size >= 0)
990
992
            return size;
 
993
        else
 
994
            goto resync;
991
995
    }
992
996
 
993
997
    if(avi->non_interleaved){
1287
1291
    int64_t pos;
1288
1292
    AVIStream *ast;
1289
1293
 
 
1294
    /* Does not matter which stream is requested dv in avi has the
 
1295
     * stream information in the first video stream.
 
1296
     */
 
1297
    if (avi->dv_demux)
 
1298
        stream_index = 0;
 
1299
 
1290
1300
    if (!avi->index_loaded) {
1291
1301
        /* we only load the index on demand */
1292
1302
        avi_load_index(s);
1293
1303
        avi->index_loaded = 1;
1294
1304
    }
1295
 
    assert(stream_index>= 0);
1296
1305
 
1297
1306
    st = s->streams[stream_index];
1298
1307
    ast= st->priv_data;
1311
1320
        /* One and only one real stream for DV in AVI, and it has video  */
1312
1321
        /* offsets. Calling with other stream indexes should have failed */
1313
1322
        /* the av_index_search_timestamp call above.                     */
1314
 
        assert(stream_index == 0);
1315
1323
 
1316
1324
        /* Feed the DV video stream version of the timestamp to the */
1317
1325
        /* DV demux so it can synthesize correct timestamps.        */