Showing the changes to libavdevice/decklink_dec.cpp (1 of 1 file). Show all
Unified · Split
| @@ -675,8 +675,7 @@ static void handle_klv(AVFormatContext *avctx, decklink_ctx *ctx, IDeckLinkVideo · 674 unmodified lines | ||
| 675 | 675 | klv.insert(klv.end(), packet.data.begin(), packet.data.end()); |
| 676 | 676 | } |
| 677 | 677 | |
| 678 | − AVPacket klv_packet; | |
| 679 | − av_init_packet(&klv_packet); | |
| 678 | + AVPacket klv_packet = { 0 }; | |
| 680 | 679 | klv_packet.pts = pts; |
| 681 | 680 | klv_packet.dts = pts; |
| 682 | 681 | klv_packet.flags |= AV_PKT_FLAG_KEY; |
| @@ -874,8 +873,7 @@ HRESULT decklink_input_callback::VideoInputFrameArrived( · 191 unmodified lines | ||
| 874 | 873 | |
| 875 | 874 | // Handle Video Frame |
| 876 | 875 | if (videoFrame) { |
| 877 | − AVPacket pkt; | |
| 878 | − av_init_packet(&pkt); | |
| 876 | + AVPacket pkt = { 0 }; | |
| 879 | 877 | if (ctx->frameCount % 25 == 0) { |
| 880 | 878 | unsigned long long qsize = avpacket_queue_size(&ctx->queue); |
| 881 | 879 | av_log(avctx, AV_LOG_DEBUG, |
| @@ -977,7 +975,7 @@ HRESULT decklink_input_callback::VideoInputFrameArrived( · 95 unmodified lines | ||
| 977 | 975 | |
| 978 | 976 | if (!no_video) { |
| 979 | 977 | IDeckLinkVideoFrameAncillary *vanc; |
| 980 | − AVPacket txt_pkt; | |
| 978 | + AVPacket txt_pkt = { 0 }; | |
| 981 | 979 | uint8_t txt_buf0[3531]; // 35 * 46 bytes decoded teletext lines + 1 byte data_identifier + 1920 bytes OP47 decode buffer |
| 982 | 980 | uint8_t *txt_buf = txt_buf0; |
| 983 | 981 | |
| @@ -1036,7 +1034,6 @@ HRESULT decklink_input_callback::VideoInputFrameArrived( · 52 unmodified lines | ||
| 1036 | 1034 | txt_buf[1] = 0x2c; // data_unit_length |
| 1037 | 1035 | txt_buf += 46; |
| 1038 | 1036 | } |
| 1039 | − av_init_packet(&txt_pkt); | |
| 1040 | 1037 | txt_pkt.pts = pkt.pts; |
| 1041 | 1038 | txt_pkt.dts = pkt.dts; |
| 1042 | 1039 | txt_pkt.stream_index = ctx->teletext_st->index; |
| @@ -1060,9 +1057,8 @@ HRESULT decklink_input_callback::VideoInputFrameArrived( · 17 unmodified lines | ||
| 1060 | 1057 | |
| 1061 | 1058 | // Handle Audio Frame |
| 1062 | 1059 | if (audioFrame) { |
| 1063 | − AVPacket pkt; | |
| 1060 | + AVPacket pkt = { 0 }; | |
| 1064 | 1061 | BMDTimeValue audio_pts; |
| 1065 | − av_init_packet(&pkt); | |
| 1066 | 1062 | |
| 1067 | 1063 | //hack among hacks |
| 1068 | 1064 | pkt.size = audioFrame->GetSampleFrameCount() * ctx->audio_st->codecpar->channels * (ctx->audio_depth / 8); |