| OLD | NEW |
| 1 /* | 1 /* |
| 2 * "NUT" Container Format demuxer | 2 * "NUT" Container Format demuxer |
| 3 * Copyright (c) 2004-2006 Michael Niedermayer | 3 * Copyright (c) 2004-2006 Michael Niedermayer |
| 4 * Copyright (c) 2003 Alex Beregszaszi | 4 * Copyright (c) 2003 Alex Beregszaszi |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 if (!flag) | 382 if (!flag) |
| 383 av_log(avf, AV_LOG_INFO, "unknown disposition type '%s'\n", value); | 383 av_log(avf, AV_LOG_INFO, "unknown disposition type '%s'\n", value); |
| 384 for (i = 0; i < avf->nb_streams; ++i) | 384 for (i = 0; i < avf->nb_streams; ++i) |
| 385 if (stream_id == i || stream_id == -1) | 385 if (stream_id == i || stream_id == -1) |
| 386 avf->streams[i]->disposition |= flag; | 386 avf->streams[i]->disposition |= flag; |
| 387 } | 387 } |
| 388 | 388 |
| 389 static int decode_info_header(NUTContext *nut){ | 389 static int decode_info_header(NUTContext *nut){ |
| 390 AVFormatContext *s= nut->avf; | 390 AVFormatContext *s= nut->avf; |
| 391 ByteIOContext *bc = s->pb; | 391 ByteIOContext *bc = s->pb; |
| 392 uint64_t tmp; | 392 uint64_t tmp, chapter_start, chapter_len; |
| 393 unsigned int stream_id_plus1, chapter_start, chapter_len, count; | 393 unsigned int stream_id_plus1, count; |
| 394 int chapter_id, i; | 394 int chapter_id, i; |
| 395 int64_t value, end; | 395 int64_t value, end; |
| 396 char name[256], str_value[1024], type_str[256]; | 396 char name[256], str_value[1024], type_str[256]; |
| 397 const char *type; | 397 const char *type; |
| 398 AVChapter *chapter= NULL; | 398 AVChapter *chapter= NULL; |
| 399 AVStream *st= NULL; | 399 AVStream *st= NULL; |
| 400 | 400 |
| 401 end= get_packetheader(nut, bc, 1, INFO_STARTCODE); | 401 end= get_packetheader(nut, bc, 1, INFO_STARTCODE); |
| 402 end += url_ftell(bc); | 402 end += url_ftell(bc); |
| 403 | 403 |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 } | 890 } |
| 891 for(i=0; i<s->nb_streams; i++) | 891 for(i=0; i<s->nb_streams; i++) |
| 892 nut->stream[i].skip_until_key_frame=1; | 892 nut->stream[i].skip_until_key_frame=1; |
| 893 | 893 |
| 894 return 0; | 894 return 0; |
| 895 } | 895 } |
| 896 | 896 |
| 897 static int nut_read_close(AVFormatContext *s) | 897 static int nut_read_close(AVFormatContext *s) |
| 898 { | 898 { |
| 899 NUTContext *nut = s->priv_data; | 899 NUTContext *nut = s->priv_data; |
| 900 int i; |
| 900 | 901 |
| 901 av_freep(&nut->time_base); | 902 av_freep(&nut->time_base); |
| 902 av_freep(&nut->stream); | 903 av_freep(&nut->stream); |
| 904 ff_nut_free_sp(nut); |
| 905 for(i = 1; i < nut->header_count; i++) |
| 906 av_freep(&nut->header[i]); |
| 903 | 907 |
| 904 return 0; | 908 return 0; |
| 905 } | 909 } |
| 906 | 910 |
| 907 #if CONFIG_NUT_DEMUXER | 911 #if CONFIG_NUT_DEMUXER |
| 908 AVInputFormat nut_demuxer = { | 912 AVInputFormat nut_demuxer = { |
| 909 "nut", | 913 "nut", |
| 910 NULL_IF_CONFIG_SMALL("NUT format"), | 914 NULL_IF_CONFIG_SMALL("NUT format"), |
| 911 sizeof(NUTContext), | 915 sizeof(NUTContext), |
| 912 nut_probe, | 916 nut_probe, |
| 913 nut_read_header, | 917 nut_read_header, |
| 914 nut_read_packet, | 918 nut_read_packet, |
| 915 nut_read_close, | 919 nut_read_close, |
| 916 read_seek, | 920 read_seek, |
| 917 .extensions = "nut", | 921 .extensions = "nut", |
| 922 .metadata_conv = ff_nut_metadata_conv, |
| 918 }; | 923 }; |
| 919 #endif | 924 #endif |
| OLD | NEW |