| 1057 | } |
| 1058 | |
| 1059 | static int read_packet(AVFormatContext *s, AVPacket *pkt) |
| 1060 | { |
| 1061 | WtvContext *wtv = s->priv_data; |
| 1062 | AVIOContext *pb = wtv->pb; |
| 1063 | int stream_index, len, ret; |
| 1064 | |
| 1065 | stream_index = parse_chunks(s, SEEK_TO_DATA, 0, &len); |
| 1066 | if (stream_index < 0) |
| 1067 | return stream_index; |
| 1068 | |
| 1069 | ret = av_get_packet(pb, pkt, len - 32); |
| 1070 | if (ret < 0) |
| 1071 | return ret; |
| 1072 | pkt->stream_index = stream_index; |
| 1073 | pkt->pts = wtv->pts; |
| 1074 | avio_skip(pb, WTV_PAD8(len) - len); |
| 1075 | return 0; |
| 1076 | } |
| 1077 | |
| 1078 | static int read_seek(AVFormatContext *s, int stream_index, |
| 1079 | int64_t ts, int flags) |
nothing calls this directly
no test coverage detected